download
-
Baidu Cloud: https://pan.baidu.com/s/1nTiYXvDtv1y2sPXEfmULfQ , extraction code: kwbo
-
Download the official website: https://www.mysql.com/downloads/
If you download the browser is slow, you can copy the download link, through
迅雷
or百度云
download, you can significantly increase download speed
After unzipping the download is complete
My.ini configuration file
Create a new directory in the decompressed my.ini
(new text document, the suffix to ini on the line), then the following configuration file contents and then writes:
[mysqld]
# 设置3306端口
port=3306
# 设置mysql的安装目录
basedir=D:\Program Files\mysql-8.0.18-winx64
# 设置mysql数据库的数据的存放目录
datadir=D:\Program Files\mysql-8.0.18-winx64\Data
# 允许最大连接数
max_connections=200
# 允许连接失败的次数。
max_connect_errors=10
# 服务端使用的字符集默认为utf8mb4
character-set-server=utf8mb4
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
# 默认使用“mysql_native_password”插件认证
#mysql_native_password
default_authentication_plugin=mysql_native_password
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8mb4
[client]
# 设置mysql客户端连接服务端时默认使用的端口
port=3306
default-character-set=utf8mb4
initialization
Administrators run cmd, enter the mysql bin directory
execute the command: mysqld --initialize --console
y,1O*>h/zY5t
is the initial password, remember to save.
install service
If you need to remove the MySQL service, the command:
mysqld remove
(Note: Always shut down the service and then delete)
Executive order: mysqld --install [服务名]
(service name may not think Jia Mo MySQL)
Change the root account password
First start the service: net start mysql
then visit: mysql -u root -p
, enter the password on it just
to change the password: ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
the last exit on the line:exit;