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 it
Run from command prompt or terminal. Replace brackets with values.
- mysqldump -h [host_ip] --port= --user=[username] --password=[password] --opt --routines [database_name] | mysql -u [username] -p[password] --port= [database_name]
You need to login to post a comment.