MySQL5.7 windows二进制安装教程
介绍1.下载解压
下载地址:http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.14-winx64.zip
将下载的mysql解压重命名放在C:\Program Files\MySQL\MySQL Server 5.7”
2.创建目录
创建数据文件和日志文件存放目录:D:\MySQL\Data;D:\MySQL\Log
3.创建my.ini
在C盘根目录下创建my.ini文件(注意隐藏的文件后缀名),内容如下(只列出安装的一些需要的配置):
[client]
no-beep
socket =0.0
port=3306
[mysqld]
server-id=45
port=3306
character-set-server=utf8mb4
pid-file ="mysql.pid"
socket =0.0
basedir="C:\Program Files\MySQL\MySQL Server 5.7"
datadir="D:/MySQL/Data"
tmpdir="D:/MySQL/Data"
default-storage-engine=INNODB
#####==========================================================================[log]================================================================================
slow-query-log=1
long_query_time=1
slow_query_log_file="D:/MySQL/Log/mysql-slow.log"
##log-bin="D:/MySQL/Log/mysql-bin"
log-error="D:/MySQL/Log/mysql-error.log"
4.初始化安装
进入cmd命令界面,切换到”cd C:\Program Files\MySQL\MySQL Server 5.7\bin”