Right having just got to grips with the mysqldump command, I would like to be able to know how to import the database back in to MySQL should anything happen to my PC.I just use the mysql client, eg to restore a full dump:
Does mysqlimport have to be done in the command line window like mysqldump, and if so, how? It's just that I tried to import stating terminated, enclosed, escaped, etc and by the time I had come to list the db name to import in to and the path to the file I wish to import, the window wouldn't let me type anymore. Why? Did it get as bored as I did?
What syntax do you people out there use?
Mat
mysql < backup_file.sql -p ( hit enter and type password )
or to restore a single database:
mysql -p ( hit enter and type password )
create database my_new_database;
exit
mysql my_new_database < backup_file.sql -p ( hit enter and type password )
Or you can edit the backup file and insert a:
use name_of_database
at the top.
You may need to turn off foreign key constraint checking first: |SET FOREIGN_KEY_CHECKS=0 ( insert this into the dump file ).
Dan | -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]