Posted By

nedf23 on 10/30/11


Tagged

mysql data mysqldump localhost Pull


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

axertion


MySQL Data Pull to Localhost


 / 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 it

Run from command prompt or terminal. Replace brackets with values.

  1. mysqldump -h [host_ip] --port=[3306] --user=[username] --password=[password] --opt --routines [database_name] | mysql -u [username] -p[password] --port=[3306] [database_name]

Report this snippet  

You need to login to post a comment.