sastro Posted March 17, 2012 Share Posted March 17, 2012 Hi, I just backup 4 databases (db1,db2,db3,db4) with : mysqldump -uroot -ppassword --databases db1 db2 db3 db4 > 4backup.sql I can not restore via phpMyAdmin because file 4backup.sql about 33 gigabyte large. how to use mysql command to restore it? Thanks in advance Quote Link to comment Share on other sites More sharing options...
trq Posted March 17, 2012 Share Posted March 17, 2012 mysql dbname < dump.sql Quote Link to comment Share on other sites More sharing options...
sastro Posted March 18, 2012 Author Share Posted March 18, 2012 So, in my case i should use mysql db1,db2,db3,db4 < 4backup.sql or mysql db1 db2 db3 db4 < 4backup.sql I just need to make sure because its need about 10 hours to restore 4backup.sql and knows its result Quote Link to comment Share on other sites More sharing options...
kicken Posted March 18, 2012 Share Posted March 18, 2012 Neither, just: mysql < 4backup.sql The sql dump should include CREATE and USE statements for each db so it will restore all four as it runs. Quote Link to comment Share on other sites More sharing options...
fenway Posted March 18, 2012 Share Posted March 18, 2012 Assuming you told it to do so with mysqldump. Quote Link to comment Share on other sites More sharing options...
sastro Posted March 18, 2012 Author Share Posted March 18, 2012 Neither, just: mysql < 4backup.sql The sql dump should include CREATE and USE statements for each db so it will restore all four as it runs. It works great.. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.