asdadaddasd 2022-04-21 11:15 采纳率: 100%
浏览 54
已结题

我今天想重启一下mysql,结果启动不起来了

linux 报错:
Starting MySQL. ERROR! The server quit without updating PID file (/var/run/mysqld/mysqld.pid).

mysql日志报错:
2022-04-21 11:10:22 28029 [Note] Plugin 'FEDERATED' is disabled.
/www/server/mysql/bin/mysqld: Unknown storage engine 'InnoDB'
2022-04-21 11:10:22 28029 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2022-04-21 11:10:22 28029 [Note] InnoDB: Using atomics to ref count buffer pool pages
2022-04-21 11:10:22 28029 [Note] InnoDB: The InnoDB memory heap is disabled
2022-04-21 11:10:22 28029 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-04-21 11:10:22 28029 [Note] InnoDB: Memory barrier is not used
2022-04-21 11:10:22 28029 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-04-21 11:10:22 28029 [Note] InnoDB: Using Linux native AIO
2022-04-21 11:10:22 28029 [Note] InnoDB: Using CPU crc32 instructions
2022-04-21 11:10:22 28029 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2022-04-21 11:10:22 28029 [Note] InnoDB: Completed initialization of buffer pool
2022-04-21 11:10:22 28029 [Note] InnoDB: Highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If you are attempting downgrade from MySQL 5.7.9 or later,
InnoDB: please refer to http://dev.mysql.com/doc/refman/5.6/en/upgrading-downgrading.html
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/error-creating-innodb.html
2022-04-21 11:10:22 28029 [ERROR] Plugin 'InnoDB' init function returned error.
2022-04-21 11:10:22 28029 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2022-04-21 11:10:22 28029 [ERROR] Unknown/unsupported storage engine: InnoDB
2022-04-21 11:10:22 28029 [ERROR] Aborting

按照指示,我在/var/run/mysqld目录添加mysqld.pid文件,但是每次启动都会自动删掉,请问要怎么解决呀,急,而且我按照网上说的,usr/local/mysql也没找到安装目录

[root@VM-16-6-centos bin]# whereis mysql
mysql: /usr/bin/mysql /usr/lib/mysql /usr/lib64/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz

[root@VM-16-6-centos bin]# which mysql
/usr/bin/mysql

  • 写回答

3条回答 默认 最新

  • 老哥讲数据库 2022-04-21 11:31
    关注

    pid是mysqld服务启动成功后创建的,你创建它干啥?
    你这个问题跟pid没关系。
    看报错信息是innodb引擎的问题,我猜测你的数据目录没挂载上,连mysql的系统表都看不到了。
    我来大概复现下你的场景:你的mysql安装后,系统中挂载了一块盘单独放数据文件,但是没写入fstab,所以当你重启后,这个盘就没有自动挂载,在其中的mysql系统表和用户库都找不到,启动自然报错了。
    fdisk -l看看是哪块盘,找到它,对照my.cnf配置文件的datadir目录,把它挂载回去再启动。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 4月29日
  • 已采纳回答 4月21日
  • 创建了问题 4月21日

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?