Home > Database > Mysql Tutorial > How to start mysql in windows

How to start mysql in windows

醉折花枝作酒筹
Release: 2021-05-22 13:50:01
forward
36482 people have browsed it

This article will introduce to you how to start mysql. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

How to start mysql in windows

1. Dos window to start mysql:

1. Windows R Enter cmd to start the dos window;

Input:

net start mysql Start the mysql service

net stop mysql Close the mysql service

2. Enter:

mysql -hlocalhost -uroot -proot to enter the mysql database, where -h Indicates the server name, localhost means local;

-u is the database user name, root is the mysql default user name; -p is the password, if a password is set, you can enter it directly after -p.

Note:

Your mysql is not installed on the C drive (sometimes mysql cannot be entered when installed on the C drive). Mysql cannot be entered. You need to use it first. The DOS command enters the bin directory under the mysql installation directory. Take my computer as an example:

Enter the D drive: enter

cd D:\Tools\MySQL5.5.25\bin to enter the bin directory of mysql before entering

mysql -hlocalhost -uroot -p123456

3. Enter show databases; display the databases you have (commands in the mysql database must end with a semicolon ";");

4. use databases name; select the database to be operated;

5. show tables; display the tables in the selected database;

6. If you want to exit the mysql database, enter exit; press Enter.

2. Click to start mysql

1. Right-click "My Computer" and select "Manage";

2. Select "Serve Applications" and then select "Service";

3. Find "MySQL" and click "Start" on the right side.

Related recommendations: "mysql tutorial"

The above is the detailed content of How to start mysql in windows. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
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