This used to be just my http://testserver/wordpress but using these simple commands you can make any staging environment production.
With that in mind, here is a simple way to duplicate a database from the command line of a windows server:
- Create the target database using MySQLAdmin or your preferred method. In this example,
db2
is the target database, where the source databasedb1
will be copied. - Execute the following statement on a command line:
mysqldump -h [server] -u [user] -p[password] db1 | mysql -h [server] -u [user] -p[password] db2
Note: There is NO space between -p
and [password]