Mysql locally exports data from a remote database

Source: Internet
Author: User


Mysql local data import from remote database written in front: recently started to use Ubuntu system, there is really no good mysql interface program, so... can only operate on the terminal. Www.2cto.com operation process: open [terminal], enter the following content directly, and press enter to complete this sentence! Purpose: copy the database of the remote server to a local device. Java code mysqldump-h'100. 212.111.123 '-uROSE-pxxxooo -- opt -- compress ITSM -- skip-lock-tables | mysql-h localhost-uroot-proot ITSMC ************* * ****** gejige 1: if you do not know the truth, see the following: 114.212.111.123 remote server name ROSE remote database login name xxxooo remote database login password ITSM remote database name (I .e. copy source) localhost local database name (usually this is the name) root local database Login Name (usually this) root local database login password (usually this) ITSMC local (that is, the purpose of copying) SQL explanation: mysqldump is a mysql Command specifically used for copy operations -- opt operation meaning -- compress compression data to be transmitted -- skip-lock ignore locked table (add this sentence to prevent when the table has foreign key error) -tables: name of all tables in a database-h server-u username (* without spaces, add username directly)-p password (* without spaces, add password directly)
Note: There is no space behind-u and-p. You can directly add the user name and password !!! : None of your business ************************* this morning, the melody of a song echoed in your ears [not seeing you for a long time ]......

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.