安装MySQL无法启动农历一个多小时也没解决,

2021-11-11T13:56:47.326245Z 0 [System] [MY-010116] [Server] E:\mysql-8.0.27-winx64\bin\mysqld (mysqld 8.0.27) starting as process 8788
2021-11-11T13:56:47.327517Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2021-11-11T13:56:47.344786Z 1 [ERROR] [MY-011011] [Server] Failed to find valid data directory.
2021-11-11T13:56:47.346205Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2021-11-11T13:56:47.347466Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-11-11T13:56:47.348619Z 0 [System] [MY-010910] [Server] E:\mysql-8.0.27-winx64\bin\mysqld: Shutdown complete (mysqld 8.0.27) MySQL Community Server - GPL.
查看错误日志提示这些

字符集不一致,系统设置是UTF8MB3。

img

两个办法一个是卸载重装mysql8,一个是修改字符集
重装参考这个文章,一步一步来就没事


修改字符集可以参考这篇文章
Warning: (3719, "'utf8' is currently an alias for the character set UTF8MB3, but will be an alias fo_cuicui_ruirui的博客-CSDN博客 pymysql执行写入mysql的操作时报错:Warning: (3719, "'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be... https://blog.csdn.net/cuicui_ruirui/article/details/105889675