mysql-8.0.31-winx64安装指南

1.在D盘将安装包解压,然后将解压的文件夹重命名成mysql

阿里云盘分享提取码:r1g2

2.在mysql创建data文件夹

3.将my.ini配置文件,复制到mysql文件夹

[client]
port=3306
default-character-set=utf8mb4
[mysql]
default-character-set=utf8mb4
[mysqld]
port=3306
# 绝对路径依据实际情况修改
basedir="D:\mysql\"
datadir="D:\mysql\data\"
# General and Slow logging.
log-output=FILE
general-log=0
general_log_file="mysql-8.0-general.log"
slow-query-log=1
slow_query_log_file="mysql-8.0-slow.log"
long_query_time=10
# Error Logging.
log-error="mysql-8.0.err"
# default_authentication_plugin=caching_sha2_password
default_authentication_plugin=mysql_native_password
default-storage-engine=INNODB
character-set-server=utf8mb4
max_connections=600
max_connect_errors=100
transaction_isolation=READ-COMMITTED
max_allowed_packet=64M
default-time-zone='+8:00'
log_timestamps=system
lower_case_table_names=1
table_open_cache=2000
tmp_table_size=512M
key_buffer_size=512M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=16M
innodb_buffer_pool_size=4G
innodb_log_file_size=1G
innodb_autoextend_increment=64
innodb_buffer_pool_instances=8
innodb_open_files=300
innodb_file_per_table=1

4.配置环境变量。

MYSQL_HOME:解压目录;

Path中增加:%MYSQL_HOME%\bin;

5.【cmd执行,切到bin目录执行】初始化数据库,执行命令mysqld --initialize --console,记住随机生成的密码

成功则提示Service successfully installed.

6.安装服务【cmd执行】:

mysqld install mysql8 --defaults-file="D:\mysql\my.ini"

7.启动服务【cmd执行】:

net start mysql8

sc config mysql start= auto

8.mysql –uroot –p初始化临时密码

root新密码设置为123456

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值