不止会JS 2022-07-05 22:51 采纳率: 75%
浏览 34
已结题

删除mysql服务,重启时失败cmd报错

启动nodemon时无法连接mysql报错
Access denied for user 'root'@'localhost' (using password: YES)
然后搜解决办法,让我修改my.ini配置文件,结果发现我没有
然后继续搜my.ini解决办法,让我自己整一个my.ini配置文件,删除mysql服务,加入my.ini,然后初始化mysql,cmd输入代码
mysqld --initialize-insecure --user=mysql
报错
2022-07-05T14:40:45.077709Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2022-07-05T14:40:45.077794Z 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-07-05T14:40:45.077803Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2022-07-05T14:40:45.080619Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2022-07-05T14:40:45.083263Z 0 [ERROR] Aborting
然后尝试删除配置文件在初始化,结果还报错
2022-07-05T14:37:09.272198Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2022-07-05T14:37:09.274525Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2022-07-05T14:37:09.274850Z 0 [ERROR] Aborting
网上搜不到解决办法,懵逼了

  • 写回答

3条回答 默认 最新

  • new一个对象_ 2022-07-06 17:31
    关注

    重新初始化密码,然后再登录

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 5月28日
  • 已采纳回答 5月28日
  • 修改了问题 7月5日
  • 创建了问题 7月5日