Mysql-h host Address-u user name-P user password enter MySQL database
Mysqladmin-u username-p Old password password new password change password
SHOW DATABASES; List databases
Use database_name using database_name database
Create DATABASE (IF EXISTS) data_name creating databases named Data_name
Drop database Data_name Delete a db named Data_name
CREATE TABLE tb_name (col1,col2 ... ); Create a table (before you must specify a database)
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7E/E0/wKioL1cLrQbhZl2_AAAKGJ5GW0w801.png "style=" float: none; "title=" 1.png "alt=" Wkiol1clrqbhzl2_aaakgj5gw0w801.png "/>
SHOW TABLES from Db_name; To view a table in a library
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7E/E3/wKiom1cLrFPziPQQAAAHpW1QxSc110.png "title=" 3.png " alt= "Wkiom1clrfpzipqqaaahpw1qxsc110.png"/>
DESC tb_name; View table structure
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7E/E0/wKioL1cLrQaxjlIaAAARoVZ2lVI021.png "title=" 2.png " alt= "Wkiol1clrqaxjliaaaarovz2lvi021.png"/>
drop table tb_name;
Modify Table
ALTER TABLE Tb_name
MODIFY Change ADD DROP
INSERT into Tb_name (Col1,col2 ... ) values| VALUE (' STRING ', NUM)
This article is from "Up for the future ..." Blog, be sure to keep this source http://goodang.blog.51cto.com/10277564/1762787
MySQL Database basic operations (03)