解压压缩包,添加 my.ini 文件
[client] # 以宽松模式设置字符集,一定要注意 loose-default-character-set = utf8 [mysqld] # 以宽松模式设置字符集,一定要注意 loose-default-character-set = utf8 # 解压路径 basedir = F:MySql-8.0.18-winx64 datadir = F:MySql-8.0.18-winx64data [WinMySQLadmin] Server = F:MySql-8.0.18-winx64inmysqld.exe
配置环境
添加环境变量,变量名为:MYSQL_HOME ,变量值为mysql根目录,如:F:MySql-8.0.18-winx64
在系统变量Path中添加:%MYSQL_HOME%in
用管理员身份运行cmd
定位到 bin
F: cd F:MySql-8.0.18-winx64in
安装MySQL
mysqld -install
Service successfully installed.
启动mysql
net start mysql
初始化密码
mysqladmin -u root -p password
打开MySQL
mysql -u root -p
重置密码
https://www.cnblogs.com/wsl-/p/10688292.html