2

I am trying to import my hosted mysql database to my local host database. I have the mysql program working on hosted domain but have unable to transfer to home server pc. Please let me know do I do it. thanks

1
  • mysqldump Commented Jul 18, 2014 at 3:42

2 Answers 2

2

You would use the MySQL Workbench. Under the Server tab there are options for Data export and Data import. So, first you need to establish a connection with the remote host (at which point click on the Server tab) and export the data. Then make a connection with your local server and import the data.

Sign up to request clarification or add additional context in comments.

Comments

1

Try this commands from terminal(Linux)

mysqldump -u username -pPassword -hHostName databasename > hostedDump.sql

Login to MySql and create the database by this command

Create database databaseName;

Then just import the dump into your database.

mysql -u userName -pPassword -h localhost < hostedDump.sql

For more reference visit mysql documentation for mysqldump.

1 Comment

Note: The lack of a space between -p and the mysql password is not a typo. However, if you leave the -p flag present, but the actual password blank then you will be prompted for your password. Sometimes this is recommended to keep passwords out of your bash history.

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.