Database update and Backup is one of the basic functions of operations, and here is the operation of the statement to do a tidy, not regularly updated.
1) Database backup statements
MYSQLDUMP-H Database IP address-u user name-p password ABC XYZ > Jqk.sql
Back up the XYZ table in the ABC library to the current directory in Jqk.sql.
2) database Import Database file
MYSQL-H Database IP address-u user name-p password ABC < jqk.sql
Jqk.sql This database file into the ABC library, pay attention! If there is no special note ABC This library, need in jqk.sql inside the first sentence to explain "use ABC;"
3) database is backed up directly to a compressed file and imported into a database from a compressed file.
#备份到压缩文件mysqldump-H Database IP address-u user name-p password ABC XYZ | gzip > jqk.sql.gz# Import from a compressed file gzip < JQK.sql.gz | MYSQL-H Database IP address-u user name-p password
4) Do not enter MySQL directly display database query results
MYSQL-H Database IP address-u user name-p password-d ABC-E ' specific SQL statement ';
, the effect is to directly query select COUNT (1) from lg_openapi_dtl_20170207 in the corresponding database:
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/8D/6D/wKioL1icHMGSWttmAABCO7xdM2A314.png "title=" 1.png "alt=" Wkiol1ichmgswttmaabco7xdm2a314.png "/>
5) Query The table statements in the library
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/8D/6F/wKiom1icHbGQA6IeAAAwRBsrkr8807.png "title=" 1.png "alt=" Wkiom1ichbgqa6ieaaawrbsrkr8807.png "/>
This article is from "Life is waiting for Gordo" blog, please make sure to keep this source http://chenx1242.blog.51cto.com/10430133/1896403
MySQL Basic operation statement