VPS侦探论坛

 找回密码
 注册
查看: 240|回复: 2

mysql无法启动

[复制链接]
发表于 2021-5-8 21:41:28 | 显示全部楼层 |阅读模式



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 [Note] 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 [ERROR] 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 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2021-05-08T13:14:34.215795Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-05-08T13:14:34.215887Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-05-08T13:14:34.215912Z 0 [ERROR] Failed to initialize builtin plugins.
2021-05-08T13:14:34.215932Z 0 [ERROR] Aborting

美国VPS推荐: 遨游主机LinodeLOCVPSKVMLAVPS2EZ搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 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';
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2021-5-9 10:27:59 | 显示全部楼层



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

cd /usr/local/mysql/bin

lnmp安装包tools目录下一直都是有mysql root密码重置工具的
美国VPS推荐: 遨游主机LinodeLOCVPSKVMLAVPS2EZ搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2021-6-24 21:14 , Processed in 0.050607 second(s), 26 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表