1 从官方下载绿色安装包 https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.31-winx64.zip
2 解压 到C:\mysql-8.0.31-winx64\
建立data目录
新建my.ini配置文件
[mysql] default-character-set=utf8 [mysqld] port=3306 basedir= C:\mysql-8.0.31-winx64 datadir= C:\mysql-8.0.31-winx64\data max_connections=200 character-set-server=UTF8MB4 default-storage-engine=INNODB
3 初始化MYSQL mysqld --initialize --console (此处会初始一个复杂的密码,稍后改密码用alter user root@’localhost’ identified by ‘xsq!@123’;)
安装成服务 mysqld --install
4 启动服务 sc start mysql 或者net start mysql
标签:8.0,windows,31,--,mysqld,mysql,安装,winx64 From: https://www.cnblogs.com/ip99/p/16932572.html