MySQL Data Pull to Localhost

/ Published in: MySQL
Save to your folder(s)

What it does
<p>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.</p>

How to use it
<p>Run from command prompt or terminal. Replace brackets with values.</p>

Copy this code and paste it in your HTML
  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


RSS Icon Subscribe to comments

You need to login to post a comment.