PDA

View Full Version : Need help restoring .sql file


rick barclay
Wed 18th Jan '06, 7:43pm
I just installed MySQL 5.x, and it's been a while since I've used an earlier version of the program. I have phpMyAdmin, but I'm still trying to figure out the syntax for the config.inc.php file, so I can't use that program for a while.

My earlier version of MySQL let me restore a backup like this:

C:\mysql\bin> mysql -p forums <C:\myfile.sql;

That command would restore myfile.sql to the "forums" folder in MySQL\Data. However, it doesn't work with MySQL 5.017, and I get a message about a syntax error instead.

Could someone please tell me the proper syntax to use so I can restore this database? I'm using the MySQL Command Line
Client and have entered my password. I'm at the >MySQL
command prompt.

I intend to read the MySQL and phpMyAdmin doc tonight, but
past experience with those two documents has been frustrating and unfullfilling.

Thanks for your help.

eva2000
Fri 20th Jan '06, 10:09am
syntax should be the same but the sql file was it made from an earlier mysql version ? how did you make the sql file from mysqldump ? or phpmyadmin ? if you used phpmyadmin it could of timed out giving you an incomplete sql backup

rick barclay
Fri 20th Jan '06, 10:24am
Thanks for your reply. Problem is fixed. I logged into the server and did a USE mydatabase > source myfile.sql;

I'm using an updated version of MySQL that has some differences from the earlier one. The sql file was a rather old copy of my forums (almost a year),
but they are now up an running on my home server, and I'm, very happy about that. :)

Thanks again.

eva2000
Sat 21st Jan '06, 8:32am
Ah glad you got it working now :)