1. Installation
Download the installation files from the official website to E:\mysql
Open E:\mysql\my-default.ini, add the following lines at the end, and save as E:\mysql\my.ini
#--------------------------------------------------------[mysqld]basedir=e:/mysqldatadir=e:/ mysql/dataport=3306character_set_server=utf8[winmysqladmin]server=e:/mysql /bin/mysqld.exe#default-character-set=utf8[client]default-character-set=utf8#------ --------------------------------------------------
View Code
2. Configuration service (command line must run as Administrator)
1) Add MySQL to the service
switching paths, adding services
--Install MySQL--defaults-file="E:\mysql\my.ini"
View Code
Enter services.msc in the command line to see that MySQL has been added to the services
2) Start the service
net start MySQL
3) Stop the service
net stop MySQL
4) Delete Service
Mysqld–remove
3. Environment variables
Add E:\mysql\bin to Path
4. Operation
Log in to the database:
C:\users\uest>mysql-u root-p
Enter Password: * * * (password initial value can be set to root or empty)
...
To change the root password:
Mysql>use MySQL;
Mysql>update user Set Password=password (' NewPassword ') where user= ' root ';
Mysql>flush privileges;
Installation configuration for MySQL