Mysql database is a relational database management system, used for small projects or personal learning applications. Mysql is very light to use, convenient and a popular database.
Mysql database start and stop commands
1. First, use the command to start the database:
Use the dos command: net start mysql and press Enter to start the database. Note that there is no semicolon ";"
2. Stop mysql database command:
net stop mysql Note that there is no semicolon after it.
Common database operation commands
1. Log in to the database :
Use command: mysql -u root -p and press Enter
Enter the user password. After successful login. The command format is "mysql>"
Instructions: -u means user root; -p means use password to log in
2. Display the database instance.
command :
show databases;
3. Select a database instance.
use database instance name ;
4. Display table information under the database instance.
show tables;
5. Query data information, select * from table name; This is the simplest sql script. If garbled characters appear, you need to set the encoding format: charset gbk
##6. Display the structure of a table .
desc table name; NotesThere is no semicolon after the start or stop database command;
The above is the detailed content of How to start and stop mysql database using dos command?. For more information, please follow other related articles on the PHP Chinese website!