windows mysql5.7安装
下载:https://downloads.mysql.com/archives/community/
解压到:C:\Program Files
目录
创建my.ini
配置文件
[mysql]
port = 3306
default-character-set=utf8
[mysqld]
default_authentication_plugin=mysql_native_password
port = 3306
basedir="C:/Program Files/mysql-5.7.28-winx64"
datadir="C:/Program Files/mysql-5.7.28-winx64/data"
log-error="C:/Program Files/mysql-5.7.28-winx64/logs/mysql.log"
character-set-server=utf8
default-storage-engine=INNODB
将C:/Program Files/mysql-5.7.28-winx64
加入环境变量
初始化mysql
mysqld --initialize-insecure --user=root
初始化后,默认用户为root
,密码为空
安装服务
mysqld --install
执行返回
Service successfully installed.
启动服务