/ Published in: MySQL
What it does
This snippet is used to pull data from one server to another. I primarily use it to get the latest data from our production to our development environments. The first part of the command is where the data is pulling from and the part after the "|" is where it is going to. In this case, it's localhost.
How to use itRun from command prompt or terminal. Replace brackets with values.
Expand |
Embed | Plain Text
mysqldump -h [host_ip] --port=[3306] --user=[username] --password=[password] --opt --routines [database_name] | mysql -u [username] -p[password] --port=[3306] [database_name]
You need to login to post a comment.
