Import a remote database to a local database

Source: Internet
Author: User
MySQL local database How to guide the data from the remote database, this article on this issue in detail, need to know the friend can refer to the following written in front: recently started with Ubuntu system, there is no good MySQL interface program, so .... It can only be operated by the terminal.
Operation Process: Open "terminal", directly enter the following content, click Enter to
Just this one sentence Oh!
Purpose: Copy the remote server's database to local. Command line: mysqldump-h 114.212.111.123-urose-pxxxooo--opt--compress ITSM--skip-lock-tables | Mysql-h Localhost-uroot-proot ITSMC
Explain:
114.212.111.123 Remote server name
ROSE Remote Database login name
XXXOOO Remote Database login password
ITSM remote database name (i.e., source of replication)
LocalHost Local host name (this is usually the case)
Root Local Database login name (this is usually the case)
Root Local Database login password (This is usually the case)
ITSMC as a local database
SQL Explanation:
Mysqldump is a MySQL-specific command for copy operations
--opt Meaning of the operation
--compress compressing the data to be transferred
--skip-lock ignores locked tables (plus this prevents errors when the table has a foreign key)
-tables all tables in a database
-H Server Name
-U user Name (* No space behind, add user name directly)
-p Password (* No space behind, direct password)
Attention:
-U,-p after no space, directly add user name and password!!!

Import a remote database to a local database

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.