Reputation: 22879
I have an online sql database which is used by a PHP web-script.
I'm working with someone who is managing a local database on their computer.
I need a way to replace the content of my online sql database with the updated version from the computer, preferably using Windows Command Line. How can I do this?
Upvotes: 0
Views: 273
Reputation: 2086
You could use the mysql utilities to do this. mysqldump will create a backup of the updated database and then you can feed that into your online database using the mysql utility.
C:>mysqldump -uUSER -pPASSWORD DATABASE > database.sql
C:>mysql -hHOST -pPORT -uUSER -pPASSWORD DATABASE < database.sql
Upvotes: 2