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