win10下安装使用mysql-5.7.23-winx64
下载MySQL
https://dev.mysql.com/downloads/file/?id=478884
解压到文件,此例为D盘根目录
在mysql-5.7.23-winx64目录下创建【my.ini】
内容如下:
[mysqld]
port = 3306
basedir=D:/mysql-5.7.23-winx64
datadir=D:/mysql-5.7.23-winx64/data
max_connections=200
default-storage-engine=INNODB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
init_connect='SET NAMES utf8mb4'
[client]
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
管理员命令行进入目录,完成安装
D:\mysql-5.7.23-winx64\bin>mysqld --initialize-insecure
D:\mysql-5.7.23-winx64\bin>mysqld install
D:\mysql-5.7.23-winx64\bin>net start mysql
安装完成后初始化密码
D:\mysql-5.7.23-winx64\bin>set password for root@localhost = password('123456');
D:\mysql-5.7.23-winx64\bin>mysql -u root -p