gpt4 book ai didi

mysql - 检查需要升级、损坏或未完全关闭的表

转载 作者:太空宇宙 更新时间:2023-11-03 12:14:13 24 4
gpt4 key购买 nike

我在我的 EC2 上运行 mysql,当我尝试这样做时:sudo/etc/init.d/mysql 重启我明白了:

  • 停止 MySQL 数据库服务器 mysqld
  • 启动 MySQL 数据库服务器 mysqld
  • 检查需要升级、损坏或未彻底关闭的表。

这是我的/var/log/mysql/error.log 中的内容

InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
140406 1:47:27 InnoDB: Unable to open the first data file
InnoDB: Error in opening ./ibdata1
140406 1:47:27 InnoDB: Operating system error number 11 in a file operation.
InnoDB: Error number 11 means 'Resource temporarily unavailable'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
140406 1:47:27 InnoDB: Could not open or create data files.
140406 1:47:27 InnoDB: If you tried to add new data files, and it failed here,
140406 1:47:27 InnoDB: you should now edit innodb_data_file_path in my.cnf back
140406 1:47:27 InnoDB: to what it was, and remove the new ibdata files InnoDB created
140406 1:47:27 InnoDB: in this failed attempt. InnoDB only wrote those files full of
140406 1:47:27 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
140406 1:47:27 InnoDB: remove old data files which contain your precious data!
140406 1:47:27 [ERROR] Plugin 'InnoDB' init function returned error.
140406 1:47:27 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140406 1:47:27 [ERROR] Unknown/unsupported storage engine: InnoDB
140406 1:47:27 [ERROR] Aborting

140406 1:47:27 [Note] /usr/sbin/mysqld: Shutdown complete

140406 01:47:27 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

谁能告诉我发生了什么事吗?

谢谢

最佳答案

看起来您有一个正在运行的 mysql 进程。您的 ./ibdata1 文件上有一把锁。可能是由于某种原因,您的 service mysql stop 命令没有停止进程,因为它可能找不到您的 mysql 服务器的 PID

从命令行运行:

ps -Af | grep mysql

获取您的 mysql 进程的 PID,然后简单地:

kill -9 <PID of your mysql process>

关于mysql - 检查需要升级、损坏或未完全关闭的表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22884401/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com