1

I develop a good website on my local computer, lets called Site A. I have packed them and put to live server which host by hosting company.

Now.. I would like to take database from Site A (live server) to my Site A database that I manage on my PC localhost.

Is there any command line work to update my Site A Database (development area) with current data table from Site A on live server?

2
  • Update, or overwrite? (Losing your local modifications) Commented Jan 22, 2014 at 8:57
  • empty the tables in local pc and import data using phpmyadmin Commented Jan 22, 2014 at 8:59

2 Answers 2

1

first from remote server in terminal/cmd:

mysqldump -u [username] -p[password] [dbname] > [backupfile.sql]

after that in local machine terminal/cmd:

mysql -u [username] -p [password] [dbname] < [backupfile.sql]
Sign up to request clarification or add additional context in comments.

Comments

1

First, if you have access to remote DB, using command line and fetch the remote database, you can do something like this:

cd "mysql_directory"

after, do

mysqldump -u username -p -h host_ip DATABASE_TO_MIRROR >c:\backup\database.sql

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.