输入mysql时返回:
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (10061)
输入mysqld --initialize-insecure时:
uanjian\AppServ\MySQL\data\is_writable' (Errcode: 2 - No such file or directory)
2024-08-17T15:32:23.619989Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2024-08-17T15:32:23.619989Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
uanjian\AppServ\MySQL\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2024-08-17T15:32:23.621989Z 0 [ERROR] --initialize specified but the data directory exists and is not writable. Aborting.
2024-08-17T15:32:23.622989Z 0 [ERROR] Aborting
查看配置的文件夹也没有data文件夹出现,
找了半天也没有找出原因,也是用管理员运行的命令行窗口,
最后把命令行窗口关闭后,重新以管理员身份打开就好了。
如果文件夹有data文件可以参考这位大佬的文章
https://blog.csdn.net/m0_37461416/article/details/78680627