I have mysql installed on my machine, and I have an empty database my_database. I'd like to restore a database dump, originally from my shared server, into this empty database. The database dump is stored at C:/My Document Names Have Spaces/my_dump.sql
I've tried:
mysql -u USERNAME -p my_database < "C:/My Document Names Have Spaces/my_dump.sql";
… and many variants thereon (different quotes, different slashes), and I keep getting syntax errors.
What am I doing wrong?
Best Answer
Specify the database you are loading the mysqldump into iwth the -D option (nospace between -D and database bame)
Or may you want to do this interactively.
Do the following:
1) Goto that directory in a DOS Window
2) Login to mysql client
3) set yourself to the my_database
3) load that file
Watch the fireworks from there !!!
Give it a Try !!!