mysql-5.7.10-winx64免安装配置方法以及mysql服务无法启动 服务没有报告任何错误解决办法

mysql-5.7.10-winx64免安装配置方法以及mysql服务无法启动 服务没有报告任何错误解决办法

四步走

  1. 解压mysql-5.7.10-winx64到D盘根目录下(随意)
  2. 进入mysql-5.7.10-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.10-winx64
datadir = D:\mysql-5.7.10-winx64\data
port = 3306
server_id = 10001


# 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 

3 .在mysql-5.7.10-winx64目录下新建文件夹名为’data’

4 . 打开dos窗口进入mysql-5.7.10-winx64\bin目录输入如下命令(管理员模式管理员模式管理员模式)

// 这条命令如果不输,也能安装成功,但是启动的时候就会报错说:服务无法启动 服务没有报告任何错误解决办法
// 这条命令之前确保data文件夹内容为空
// 文档表明,使用-initialize生成随机密码,由于自己学习,使用-initialize-insecure生成空密码。默认帐号root,后面的-user=mysql不更改
mysqld --initialize-insecure --user=mysql
// 安装服务
mysqld install
// 启动服务
net start mysql
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值