windows mysql-5.7.15-winx64解压版(zip版)安装配置教程

1.进入MySQL官网下载 mysql-5.7.15-winx64.zip

2.mysql-5.7.15-winx64.zip 解压到 D:\ 目录下,生成mysql-5.7.15-winx64文件夹

3.创建my.ini作为MySQL的配置文件
在 D:\mysql-5.7.15-winx64下,复制“my-default.ini”,将生成的文件重命名为“my.ini”,修改其中的内容如下:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.

[mysqld]

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
 innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
 basedir = D:\\mysql-5.7.15-winx64
 datadir = D:\\mysql-5.7.15-winx64\\data
 port = 3306
#自定义主机ID识别符,用于主从或多服务器之间识别,为 一个 int 类型 
 server_id = 1

character_set_server=utf8

# 最大连接数量 
max_connections = 100 

#CREATE TABLE 语句的默认表类型,如果不自己指定类型,则使用下行的类型 
default-storage-engine = InnoDB


# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
 join_buffer_size = 128M
 sort_buffer_size = 2M
 read_rnd_buffer_size = 2M 

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 
4.将D:\mysql-5.7.15-winx64\bin配置到环境变量path中

5.安装mysql为windows服务

D:\mysql-5.7.15-winx64\bin\mysqld.exe -install mysql
6.mysql 5.7+版本的根目录下缺少data文件夹,此时不要去拷贝其他版本的date文件夹,打开cmd命令窗口,并且进入到D:\mysql-5.7.15-winx64\bin目录中,输入以下命令:

mysqld --initialize-insecure --user=mysql
7.启动mysql服务:

net start mysql
8.登录修改mysql密码

cmd进入命令行

mysql -u root -p
回车 回车

进入数据库

usr mysql;
select host ,user,authentication_string from user;
update user set authentication_string=authentication_string('123456') where user='root';
flush privileges;

 9.修改权限 

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Linkgoo1409' WITH GRANT OPTION;



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值