importing a large database dump

Problems with the Windows version of XAMPP, questions, comments, and anything related.

importing a large database dump

Postby tonyhs » 16. January 2013 20:44

Hi,
I am trying to upload a large database dump (9mb) into the database 'test' using xampp for windows. I open phpadmin, select the SQL tab and type in:-

mysql -h127.0.0.1 -uroot -pLocalhstpw test < database_dump.sql

When I press 'go' I get the following error message:-

#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 'mysql -h127.0.0.1 -uroot -pLocalhstpw test < database_dump.sql' at line 1

I cannot see where the syntax error is. any help would be greatly appreciated.

Regards

Tony
tonyhs
 
Posts: 2
Joined: 16. January 2013 20:35
XAMPP Version: 5.6.3
Operating System: windows 7

Re: importing a large database dump

Postby hackattack142 » 16. January 2013 22:51

Hello,

What you are trying to put in is not SQL.

If you want to do that, open a command prompt (Start > run > cmd), change to the '/xampp/mysql/bin' directory, then run that command (assuming the .sql file is also in that directory).
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 703
Joined: 20. May 2011 23:29
XAMPP Version: 5.6.3
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: importing a large database dump

Postby tonyhs » 17. January 2013 08:56

Many Thanks, I was trying to test out the command (taken from a php script) as it kept giving a warning but not showing what the warning was. I will use the command box as you suggest.

Thanks again

Tony
tonyhs
 
Posts: 2
Joined: 16. January 2013 20:35
XAMPP Version: 5.6.3
Operating System: windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 41 guests