MySQL8022 服务正在启动 .
MySQL8022 服务无法启动。
服务没有报告任何错误。
错误日志如下:
2022-04-09T13:01:27.088850Z 0 [System] [MY-013169] [Server] c:\Program Files\MySQL\mysql-8.0.28-winx64\mysql-8.0.28-winx64\bin\mysqld.exe (mysqld 8.0.28) initializing of server in progress as process 1916
2022-04-09T13:01:27.090326Z 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.
2022-04-09T13:01:27.142205Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-04-09T13:01:27.912965Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-04-09T13:01:29.539661Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: Ej<uMd/h6lOt
2022-04-09T13:02:14.006024Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\mysql-8.0.28-winx64\mysql-8.0.28-winx64\bin\mysqld (mysqld 8.0.28) starting as process 27292
2022-04-09T13:02:14.008668Z 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.
2022-04-09T13:02:14.031775Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-04-09T13:02:14.323380Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-04-09T13:02:14.610934Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-04-09T13:02:14.611624Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-04-09T13:02:14.618592Z 0 [ERROR] [MY-000067] [Server] unknown variable 'default-file=C:\Program Files\MySQL\mysql-8.0.28-winx64\mysql-8.0.28-winx64\bin\my.ini'.
2022-04-09T13:02:14.620510Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-04-09T13:02:15.911864Z 0 [System] [MY-010910] [Server] C:\Program Files\MySQL\mysql-8.0.28-winx64\mysql-8.0.28-winx64\bin\mysqld: Shutdown complete (mysqld 8.0.28) MySQL Community Server - GPL.
2022-04-09T13:04:02.692405Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\mysql-8.0.28-winx64\mysql-8.0.28-winx64\bin\mysqld (mysqld 8.0.28) starting as process 3548
2022-04-09T13:04:02.695032Z 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.
2022-04-09T13:04:02.716884Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-04-09T13:04:03.034285Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-04-09T13:04:03.249569Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-04-09T13:04:03.250290Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-04-09T13:04:03.257852Z 0 [ERROR] [MY-000067] [Server] unknown variable 'default-file=C:\Program Files\MySQL\mysql-8.0.28-winx64\mysql-8.0.28-winx64\bin\mysqld.exe'.
2022-04-09T13:04:03.259692Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-04-09T13:04:04.398457Z 0 [System] [MY-010910] [Server] C:\Program Files\MySQL\mysql-8.0.28-winx64\mysql-8.0.28-winx64\bin\mysqld: Shutdown complete (mysqld 8.0.28) MySQL Community Server - GPL.
一共分三次,第一次是执行mysqld --initialize
时产生的,第二次和第三次是启动mysql服务的时候产生的,两次的差别是 修改了注册表的ImagePath的值,也就是把my.ini改成了mysqld.exe。其他的我啥也不知道了。
本来电脑上有一个mysql5.5的版本,但是有点低,我寻思装一个新版本。之前的服务是mysql55,这次的服务是mysql8022,之前的端口是3306,新端口为3307,所以应该不存在冲突,还有my.ini文件如下
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
#设置3307端口
port = 3307
# 设置mysql的安装目录
basedir=C:\\Program Files\\MySQL\\mysql-8.0.28-winx64\\mysql-8.0.28-winx64
# 设置mysql数据库的数据的存放目录
datadir=C:\\Program Files\\MySQL\\mysql-8.0.28-winx64\\mysql-8.0.28-winx64\\data
# 允许最大连接数
max_connections=200
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
是网上教程的初始化文件