(after MySQL is installed and configured.)
One. Start or close the MySQL service
Start service: NET start database service name
Shutdown Service: net stop database service name
Attention:
If you are already in mysql->, you cannot use the above two commands, use quit to exit this layer.
The above two commands must be executed under a CMD window.
Two. Log in to the MySQL management system
Mysql-u User name-p password
If welcome to MySQL appears ... Indicates a successful database connection
Note: When executing commands under CMD, the command line does not need the lowercase ";" at the end. Semicolon.
Three. Create, view, delete, and use the database
To Create a database :
CREATE database name DEFAULT charset= ' UTF8 ';
For example:
Create Database student default charset= ' Utf-8 ';
Create a database student the default character encoding Utf-8
View all databases for this server:
show databases;
To delete a database:
Drop database name;
Use a database:
Use database name;
Show all the tables in the library:
Show tables;
Exit Current Connection
Quit
MySQL Command line client commands