First, configure the environment and login settings
1.1 Setting the System environment variables:
X:\wnmp\mysql\bin
Load the Ptah in the environment variable of the system, add at the end of the last variable; x the disk symbol stored for MySQL
2.2 Set Password:
Mysql-uroot-p
Password
Set Password=password (' Password ');
2.3 Enter the database:
2.3.1
Mysql-uroot-proot
This is a one-time input account and clear text password enter-u for the account fill-p to fill in the password
2.3.2
Mysql-uroot-p
Password
This is two times enter account and dark text password Enter-u for account fill-p after enter will appear password: After, fill in password enter
Second, create the database
2.1 Creating a Database
Create database if not exists XXXX;
XXXX is the library name of the database
2.2 Displaying database information
show databases;
Show All the Libraries
Third, view the relevant
3.1 Open File List
Use XXX;
XXX, the name of the library to view
3.2 Viewing the contents of a table
3.2.1
Desc XXXX;
XXXX is the name of the table to view
3.2.2
Show CREATE TABLE XXXX;
XXXX is the name of the table to view
3.3 Querying the inserted statements and values
Select *from XXXX;
XXXX is the name of the table to view
3.4 Add Chinese ID
Set names UTF8;
Four, create a form
4.1, create a table table value not filled by default is null NOT NULL
CREATE table if not EXISTS ' XXXX ' (
ID Int (ten) is not NULL,
.......
) engine=innodb DEFAULT charset= ' UTF8 ';
XXXX is the table name
Fields need to be used; Separates the last field without symbols
4.2, create a table to determine the primary key and self-increment
CREATE table if not EXISTS ' XXXX ' (
ID Int (ten) unsigned not NULL primary key auto_increment
.......
) engine=innodb DEFAULT charset= ' UTF8 ';
XXXX is the table name
Primary key Set Primary key
Auto_increment Setting the self-increment
Fields need to be used; Separates the last field without symbols
4.3, inserting data
4.3.1
Insert INTO ' XXXX ' values (XXX, ' xxx ', ' xxx ');
Table Name Value
4.3.2,
Insert INTO ' XXXX ' (xxxx,xxxx,xxxx) VALUES (xx, ' xx ', ' xx ');
Indicates the field name value
Contents of MySQL under DOS