无法停止Ubuntu Lucid上的MariaDB

在启动MariaDB 5.5时出现以下错误:

InnoDB: Unable to lock /var/lib/mysql/ibdata1 

在服务器重新启动运行MariaDB 5.1后,最初遇到这个错误。 已经进行了一些故障排除步骤,包括:

  • 将MariaDB升级到5.5
  • 移动和复制ib *文件
  • 删除Apparmor(停止syn溢出错误)

我也收到其他错误,如:

 InnoDB: Could not open or create data files. InnoDB: If you tried to add new data files, and it failed here, InnoDB: you should now edit innodb_data_file_path in my.cnf back InnoDB: to what it was, and remove the new ibdata files InnoDB created InnoDB: in this failed attempt. InnoDB only wrote those files full of InnoDB: zeros, but did not yet use them in any way. But be careful: do not InnoDB: remove old data files which contain your precious data! [ERROR] Plugin 'InnoDB' init function returned error. [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. [Note] Plugin 'FEEDBACK' is disabled. [ERROR] Unknown/unsupported storage engine: InnoDB [ERROR] Aborting 

但我确信这只是最初的错误的结果。

当我停止MariaDB(/etc/init.d/mysql stop)时,它说MariaDB已经成功停止。 但是当做一个ps -ef | grep mysql里面还有一个PID。

如果我杀了PID它会自动重新创build。

这个PID的ps输出是:

 mysql 9173 1 17 09:43 ? 00:00:00 /usr/sbin/mysqld 

当这个PID存在时,我可以login到MySQL,它显示正常的SHOW PROCESSLIST,但也有一个睡眠查询。

有什么其他方法可以尝试解决这个问题吗? 帮助将不胜感激。

更新#1

为了让服务器回到我已经完成的已知状态:

  • 在进行任何configuration更改之前还原备份
  • 将MariaDB更新到版本5.5
  • 停止Apache和MySQL
  • 请注意,stream氓MySQL PID仍然存在
  • 将my.cnf文件移至新名称
  • 再次停止MySQL
  • 冉ps -ef | grep mysql,看看PID是否消失了
  • 将my.cnf移回
  • 启动MySQL
  • 注意只有有效的MySQL PID存在
  • 启动Apache,并指出我无法让我的网站连接
  • Made Joels更改为my.cnf文件(default_storage_engine = InnoDB TO default-storage-engine = innodb)
  • 再次启动MySQL和Apache

目前,网站无法访问。 没有任何东西正在写入系统日志或Apache错误日志,这是不正常的。 我只是不知道为什么我无法访问网站。

我在我的系统日志中得到这个错误:

 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave. Statement: UPDATE thread AS thread,taggregate_temp_1371329760 AS aggregate 

有任何想法吗?

更新#2

我现在在我的系统日志中收到这些错误:

 Jun 16 11:31:45 kernel: net_ratelimit: 5 callbacks suppressed Jun 16 11:31:45 kernel: TCP: Possible SYN flooding on port 80. Sending cookies. 

而现在重新启动我的服务器后,我收到这个错误和上述…

 Unable to lock /var/lib/mysql/ibdata1, error: 11 

我以前有过这个问题,它与你的MariaDBconfiguration有关。 你可能在这个my.cnf中指定一行:

 default-storage-engine = InnoDB 

使用所有小写字母指定存储引擎,如下所示:

 default-storage-engine = innodb