du45273117 发表于 2021-5-8 21:41:28

mysql无法启动

centos 7.9.2009 全新安装lnmp 1.7正式版
正常安装完毕,无报错。。后续重启lnmp,发现mysql无法启动
报错:Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/var/kvm-NY-8.79.pid).

查看日志:

2021-05-08T13:14:33.599977Z 0 InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-05-08T13:14:33.610122Z 0 InnoDB: The Auto-extending innodb_system data file '/usr/local/mysql/var/ibdata1' is of a different size 0 pages (rounded down to MB) than specified in the .cnf file: initial 640 pages, max 0 (relevant if non-zero) pages!
2021-05-08T13:14:33.610177Z 0 InnoDB: Plugin initialization aborted with error Generic error
2021-05-08T13:14:34.215795Z 0 Plugin 'InnoDB' init function returned error.
2021-05-08T13:14:34.215887Z 0 Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-05-08T13:14:34.215912Z 0 Failed to initialize builtin plugins.
2021-05-08T13:14:34.215932Z 0 Aborting

du45273117 发表于 2021-5-8 22:11:31

已解决。重新初始化数据库

cd /usr/local/mysql/bin
./mysqld --initialize --datadir=/usr/local/mysql/var --user=mysql --basedir=/usr/local/mysql
记住随机生成的密码。
这时重启,发现成功了。
登录mysql后提示需要修改密码:
alter user 'root'@'localhost' identified by '123123123';

licess 发表于 2021-5-9 10:27:59

du45273117 发表于 2021-5-8 22:11
已解决。重新初始化数据库

cd /usr/local/mysql/bin


lnmp安装包tools目录下一直都是有mysql root密码重置工具的
页: [1]
查看完整版本: mysql无法启动