0

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?

2
  • why can't the person manage the online database from their computer ? wiping the content of a public online database is always sensitive and can generate request failures. Commented May 23, 2012 at 16:18
  • We have a batch program running on that local computer/database already which converts the info into several PDFs and other assets. The command line I'm looking for will simply be added to the already existing program which is run every week. Commented May 23, 2012 at 16:33

1 Answer 1

2

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.