Confirm it is installedMySQL
(1) Press [win+r] shortcut key to open and run;
(2) input services.msc
;
(3) Click [OK] and search for mysql
the service . If there is no mysql
service, it means that the machine is not installed mysql
, otherwise, it means that the machine has installed mysql
the service .
download
Selective installation through MYSQL
official methods .Installer
MySQL Community Server
Open the download link https://dev.mysql.com/downloads/installer/ , the first one is the web installation package, after enabling it, you can download MySQL online for you; select the second one:
MySQL Installer
Unlike the standard ,web
the installer package doesn't bundle anyMySQL
applications, but it does downloadMySQL
the products .
Select the second .msi
installation file, enter the download page, find this sentence in the jump page “No thanks, just start my download.”
, click the text, and download:
Install
Windows
Two MySQL
installation :
- MySQL binary distributions (.msi installation files)
- Free installation version (.zip compressed file)
Downloaded installation package:
Next , install it according to the tutorial "Next step" all the way!
MySQL8.0
It is installed by default C:\Program Files\MySQL\MySQL Server 8.0
, as follows:
MySQL
first use
start service
Use the command net start mysql
to start MySQL
, as follows:
Out of service
Use the command in the terminal net stop mysql
to stop the service, as follows:
net start mysql,net stop mysql
The third value of these two commands is the service name, because the service name is configured during installation mysql80
, so the user name is actually used to start and stop the service: mysql80
.
connect to MySQL
server
Run cmd
Terminal , enter:
cd C:\Program Files\MySQL\MySQL Server 8.0\bin
Then, execute in this directory:
mysql -u root -p
Then enter the password, as follows:
Now that you have entered MySQL
the command line, you can use MySQL
the command line with statements.
Exit the MySQL
interactive command line
Exit the MySQL
interactive command line: press the keyboard at the same time Ctrl + z
, and then press Enter, as follows: