Not able to import MySQL database using SSH
Hi Guys,
Today I was importing my wordpress database (from shared hosting) to my new VPS having nginx, mysql and php on Ubuntu 11.10 I ftp'd my wordpress database(wp_db.sql) to my VPS and then I cd'd into the directory containing the wp_db.sql, now I created a new database in mysql named wordpress using phpmyadmin and then I ran the following command to import wp_db.sql into wordpress database: Code:
mysql -u root -p wordpress < wp_db.sql Quote:
Please Help Thanks :) |
It's not your command like that's causing the problems it's something in your wp_db.sql file that has a command that's wrong.
|
[QUOTE=dreamcoder;4744108]
I was prompted for password which I entered and got the following error: Quote:
to see what's in there. |
[QUOTE=lithos;4744184]
Quote:
wp_db.sql contains many wp tables, I don't know which table has the wrong syntax causing this error Is there any way to find it out ?? |
Did you dump the database to file ?
then you get a "text" file, so post first few lines... (# head wp_db.sql) |
Quote:
Thanks a lot bro, the problem was indeed in the .sql file I re-exported the full database (from my shared hosting) as .sql using a plugin - backupwordpress and then ftp'd this exported database to my vps and then ran the command: Quote:
I think the problem arised because phpmyadmin (on my shared hosting) was not exporting the 500MB database properly (still don't know why) Anyways, thanks a lot for your hint mate :) |
Great,
I'm glad to see you worked it out. Thanks for posting back. |
All times are GMT -5. The time now is 12:28 PM. |