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 ]......