启动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
网上搜不到解决办法,懵逼了
重新初始化密码,然后再登录
你第一次报错是用户名密码错误。。
2022-07-05T14:40:45.080619Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
把你安装数据库位置的data文件夹删了,重新初始化就ok了