Article directory
1. Download address
https://dev.mysql.com/downloads/mysql/
Unpacked version:
Link: https://pan.baidu.com/s/1YFWoFMvOqkSab21eg7fl7w?pwd=bje6
Extraction code: bje6
Copy this content and open Baidu Netdisk App
2. Add operation
1. Create a file called my.ini
2. Modify the my.ini file
[mysql]
#设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
#设置3306端口
port = 3306
basedir =D:\\shujuku\\mysql\\
datadir=D:\\shujuku\\mysql\\data
max_connections=20
character-set-server=utf8
default-storage-engine=INNODB
sql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
Notice! ! !
(1) The directory must be "\", do not write "\"
(2) Mysql installation directory and data storage must be modified to the directory set by yourself, unless the set directory is consistent with the above
3. Configure the environment variables of mysql
Click path to join mysql
Four, run cmd
Run cmd as an administrator
to enter the bin directory
Excuting an order
mysqld --initialize
At this time, a new directory data will be generated. View the .err file to view the random password generated by the root user.
Random password:
Execute the command to install the mysqld service
mysqld --install
Execute the command to start the service
net start mysql
Connect to the database
mysql -u root -p
enter a randomly generated password
change root password
ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘root’;
Successfully modified
exit mysql