mysql ‘net start mysql‘启动失败问题排查

原因分析:修改my.ini文件后,启动失败;查看data文件下的log日志,发现错误 "MySQL: Table 'mysql.plugin' doesn't exist"

解决方法:

1.清空data文件夹

2.将my.ini复制到 mysql server/bin目录下

3.cmd 切换到bin目录下执行如下命令

C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld --initialize --user=mysql --console

结果如下:

C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld --initialize --user=mysql --console 2022-06-03T08:12:43.374988Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2022-06-03T08:12:43.374988Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2022-06-03T08:12:43.374988Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set. 2022-06-03T08:12:44.743029Z 0 [Warning] InnoDB: New log files created, LSN=45790 2022-06-03T08:12:44.953670Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. 2022-06-03T08:12:45.058928Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: f298bc4a-e314-11ec-a82a-7085c2205e60. 2022-06-03T08:12:45.062281Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2022-06-03T08:12:45.066925Z 1 [Note] A temporary password is generated for root@localhost: Ct,;p;lD)1f=

记录下临时密码

4.bin目录下 启动 net start mysql

提示:启动成功

5.登录mysql 修改root密码

C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -u root -p 
Enter password: ************

 mysql>set password =password('root')

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值