win10安装mysql

1.下载:

https://dev.mysql.com/downloads/mysql/ 

2.配置环境变量

win10安装mysql

3.在E:\software\mysql-8.0.16-winx64创建my.ini

[mysql]
default-character-set=utf8

[mysqld]
port = 3306
basedir=E:\software\mysql-8.0.16-winx64
datadir=E:\software\mysql-8.0.16-winx64\data
character-set-server=utf8
default-storage-engine=INNODB

4.以管理员身份运行cmd

cd /d E:\software\mysql-8.0.16-winx64\bin

mysqld --initialize-insecure --user=mysql

 

如果报windows无法启动mysql服务,错误2:系统找不到指定文件

进入注册表编辑器。选择HKEY_LOCAL_MACHINE ->SYSTEM -> CurrentControlSet -> services ->MySQL,修改ImagePath的路径为Mysql安装路径,

5.net start mysql

 

上一篇:mysql安装忘记初始密码怎么办


下一篇:MySQL的下载安装