MySQL local database How to guide data from a remote database _mysql

Source: Internet
Author: User
Written in the front: recently started with the Ubuntu system, there is no good MySQL interface program, so .... Can only use the terminal operation of the.
Operation Process: Open "terminal", directly enter the following content, click to return
That's a word, oh!
Purpose: Copy the database of the remote server to the local.
Java code
Copy Code code as follows:

Mysqldump-h ' 114.212.111.123 '-urose-pxxxooo--opt--compress ITSM--skip-lock-tables | Mysql-h Localhost-uroot-proot ITSMC

Gerry 1: Look at the bottom of the unknown *******************************
Explain:
114.212.111.123 Remote server name
ROSE Remote Database login name
XXXOOO Remote Database login password
ITSM Remote Database name (that is, the source of the replication)
localhost Local database name (this is typically the case)
Root Local Database login name (This is typically the case)
Root Local Database login password (This is usually the case)
ITSMC local (that is, the purpose of replication)
SQL Explanation:
Mysqldump is a MySQL-specific command for copy operations.
The meaning of the--opt operation
--compress compress the data to be transferred
--skip-lock ignores locked tables (plus this prevents an error when the table has a foreign key)
-tables all tables in a database
-H Server Name
-u username (* No space after, directly add user name)
-p Password (* No space behind, direct password)
Attention:
-U,-P with no space, directly add username and password!!!
Gerry 2:none of your business************************
This morning, my ears echoed the melody of a song "Long time No See" ...
Related Article

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.