MySQL Tutorial common command set
Create database name; Create a database tutorial
Use DatabaseName; Select Database
Drop database name deletes databases directly, without alerting
Show tables; Show Table
Describe TableName; Detailed description of the table
Add distinct in Select to remove duplicate fields
Mysqladmin drop databasename Before you delete a database, you are prompted.
Display current MySQL version and current date
Select version (), current_date;
2, modify the MySQL root password:
Shell>mysql-u root-p
mysql> Update user Set Password=password ("xueok654123′) where user= ' root ';
Mysql> flush Privileges//Refresh Database
Mysql>use dbname; Open database:
Mysql>show databases; Show all databases
Mysql>show tables; Display all tables in database MySQL: use MySQL first;
Mysql>describe user; Displays the column information for the user table in the MySQL database of the table);
3. Grant
Create a complete superuser who can connect to the server from anywhere, but you must use a password something do this
Mysql> grant all privileges in *.* to user@localhost identified by ' something ' with