Windows安装mysql-5.7.17-winx64.zip方式记录<
1.去官网上下载.zip格式的文件.
2.解压到一个文件夹,这里我用D:\MySql表示
3.在D:\MySql\mysql-5.7.17-winx64下新建my.ini配置文件
黄色背景色的地方需要替换成自己内容,切记!!!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
####################配置文件开始###################
[client]
default - character - set =utf8
[mysqld]
port=3306
basedir = "D:\MySql\mysql-5.7.17-winx64/"
datadir = "D:\MySql\mysql-5.7.17-winx64/data/"
tmpdir = "D:\MySql\mysql-5.7.17-winx64/data/"
socket = "D:\MySql\mysql-5.7.17-winx64/data/mysql.sock"
log-error= "D:\MySql\mysql-5.7.17-winx64/data/mysql_error.log"
#server_id = 2
#skip-locking
max_connections=100
table_open_cache=256
query_cache_size=1M
tmp_table_size=32M
thread_cache_size=8
innodb_data_home_dir= "D:\MySql\mysql-5.7.5-m15-winx64/data/"
innodb_flush_log_at_trx_commit =1
innodb_log_buffer_size=128M
innodb_buffer_pool_size=128M
innodb_log_file_size=10M
innodb_thread_concurrency=16
innodb-autoextend-increment=1000
join_buffer_size = 128M
sort_buffer_size = 32M
read_rnd_buffer_size = 32M
max_allowed_packet = 32M
explicit_defaults_for_timestamp= true
sql-mode= "STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
#sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
####################配置文件结束###################
|
4.在Windows的PATH环境变量下加入,黄色注意替换!!!
D:\MySql\mysql-5.7.17-winx64\bin;(注意加分号)
5.打开管理员的cmd,进入到存放文件目录的/bin中,黄色注意替换!!!
1
|
mysqld install MySQL --defaults- file = "D:\MySql\mysql-5.7.17-winx64\my.ini"
|
6.在cmd中输入
1
|
net start mysql
|
出现MySQL服务无法启动,服务没有报告任何错误
7.解决办法
1
2
3
4
|
mysqld --romve
mysqld --install
mysqld --initialize
net start mysql
|
8.现在可以正常使用mysql了,启动/停止mysql的cmd命令如下
1
2
|
net start mysql
net stop mysql
|
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持服务器之家。
原文链接:http://www.cnblogs.com/HurryXin/p/6181661.html