I find myself develop apps in my home, which then, on the commercial server are filled with data.
I need a simple and easy way to dump a MySql DB from the commercial server into my private one.
Is there a tool/command to do this?
(I thought about making my DB a slave, but then, I don't always have the permissions to touch the commercial MySql server, and I do develop on my Server...which could cause problems, if they where linked that way).
views:
193answers:
2
+3
A:
This is how you can backup a database and reload it as well.
On master server
mysqldump -u[username] -p[password] databasename > database.sql
Or if you need to include functions and or triggers do
mysqldump -u[username] -p[password] --routines --triggers databasename > database.sql
Copy database.sql to dev server
On dev server
mysql -u[username] -p[password] databasename < database.sql
zodeus
2009-03-06 03:24:05
Just as a note, mysqldumps can take an extended amount of time depending on the amount of table. If your outfit is 24x7 then this might not be a viable option. I have no other options for you though.
Suroot
2009-03-06 03:29:11
I Agree completely.
zodeus
2009-03-06 03:33:33
I will need an access to a shell, right? That is a problem, as not every hosting gives a shell access.
Itay Moav
2009-03-06 04:44:37
Unfortunately yes you do need a shell. If you don't have shell access I recommend SQLYog we have been using it our shop for years. I think it's around $100.
zodeus
2009-03-06 05:05:24