Re: getting dumped data back into new db

2004-08-22 Thread Michael Stassen
No, you enter that command at your shell prompt. mysql says, "launch the mysql client with input from mydb.sql." Add whatever options you need: mysql -u root -p dbname for example. If you have already started the client (you're at the mysql prompt), then use the source command: mysql>

Re: getting dumped data back into new db

2004-08-22 Thread Michael J. Pawlowsky
Just thought I would add you should take a look at the man page for mysqldump. At a shell prompt type "man mysqldump". Michael J. Pawlowsky wrote: Don't do it from within mysql. Do it from your shell prompt. [EMAIL PROTECTED] directoy]$mysql -p database < database.sql "-p" is used for promptin

Re: getting dumped data back into new db

2004-08-22 Thread Michael J. Pawlowsky
Don't do it from within mysql. Do it from your shell prompt. [EMAIL PROTECTED] directoy]$mysql -p database < database.sql "-p" is used for prompting for a password. You only need it if you need a password. "<" means to redirect the sql file as input to the mysql command. "database" is the actual

Re: getting dumped data back into new db

2004-08-22 Thread tlr7425
I get: mysql> -p database < /Users/me/Desktop/database.sql; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-p database < /Users/me/Desktop/database.sql' at line 1 Thanks, TR On Aug 22, 2004, at

Re: getting dumped data back into new db

2004-08-22 Thread Michael J. Pawlowsky
Generally it's just sql. The easiest way would be from a command line on the server. mysql -p dbname < mydb.sql Cheers, Mike [EMAIL PROTECTED] wrote: Hi, I dumped an entire db (using phpMyAdmin, MySQL 4.0.18) I have a file now: mydb.sql Again, this is the entire db. Now I have recreated the db an

getting dumped data back into new db

2004-08-22 Thread tlr7425
Hi, I dumped an entire db (using phpMyAdmin, MySQL 4.0.18) I have a file now: mydb.sql Again, this is the entire db. Now I have recreated the db and all the tables, rows, etc. All I need to do is to get the data (data only, db is built) that goes into those tables and rows from the file into the