Home > Database > Mysql Tutorial > How to start and stop mysql database using dos command?

How to start and stop mysql database using dos command?

黄舟
Release: 2017-08-07 14:21:51
Original
3048 people have browsed it

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 ";"

How to start and stop mysql database using dos command?

2. Stop mysql database command:

net stop mysql Note that there is no semicolon after it.

How to start and stop mysql database using dos command?

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

How to start and stop mysql database using dos command?

2. Display the database instance.

command :

 show databases;
Copy after login

How to start and stop mysql database using dos command?

3. Select a database instance.

use database instance name ;

How to start and stop mysql database using dos command?

4. Display table information under the database instance.

show tables;
Copy after login

How to start and stop mysql database using dos command?

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

How to start and stop mysql database using dos command?

How to start and stop mysql database using dos command?


##6. Display the structure of a table .

desc table name;

How to start and stop mysql database using dos command?

Notes

There 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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template