【问题标题】:mysql - Can't lock aria control filemysql - 无法锁定 aria 控制文件
【发布时间】:2016-08-22 17:19:39
【问题描述】:

我在使用 MariaDB 时遇到了问题,虽然它最初运行良好。当我无法再启动 MySQL 守护进程时,我只重新启动了服务器。它似乎仍在使用我的旧 USB 记忆棒的文件路径 (/media/brood),而我已经切换到新的硬盘驱动器 (/media/seagate)。这是我在 /var/log/mysql/error.log 中遇到的错误:

160728  9:32:32 [ERROR] mysqld: Can't lock aria control file '/media/brood/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds
160728  9:33:03 [ERROR] mysqld: Got error 'Could not get an exclusive lock; file is probably in use by another process' when trying to use aria control file '/media/brood/mysql/aria_log_control'
160728  9:33:03 [ERROR] Plugin 'Aria' init function returned error.
160728  9:33:03 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
160728  9:33:03 [Note] InnoDB: Using mutexes to ref count buffer pool pages
160728  9:33:03 [Note] InnoDB: The InnoDB memory heap is disabled
160728  9:33:03 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
160728  9:33:03 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
160728  9:33:03 [Note] InnoDB: Compressed tables use zlib 1.2.8
160728  9:33:03 [Note] InnoDB: Using Linux native AIO
160728  9:33:03 [Note] InnoDB: Not using CPU crc32 instructions
160728  9:33:03 [Note] InnoDB: Initializing buffer pool, size = 128.0M
160728  9:33:03 [Note] InnoDB: Completed initialization of buffer pool
160728  9:33:03 [ERROR] InnoDB: Unable to lock ./ib_logfile0, error: 11
160728  9:33:03 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
160728  9:33:03 [ERROR] InnoDB: Unable to open './ib_logfile0'
160728  9:33:03 [ERROR] Plugin 'InnoDB' init function returned error.
160728  9:33:03 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160728  9:33:03 [Note] Plugin 'FEEDBACK' is disabled.
mysqld: Too many arguments (first extra is 'stop').
160728  9:33:03 [ERROR] Aborting

160728  9:33:03 [Note] mysqld: Shutdown complete

也可能是权限问题,或者文件仍然被锁定(我不知道这是怎么回事),因为树莓派上次重启是因为有人不小心拔掉了树莓派的电源插头。

【问题讨论】:

  • 您是如何切换到新硬盘 /media/seagate 的?
  • 可能是磁盘空间不足,试图构建它需要的临时表。您是否将 tmpdir 设置为单独的小型文件系统?
  • @apesa 我只是用相同的文件系统(ext4)格式化了新的硬盘,然后将所有文件(文件夹 htdocs 和 mysql)从 U 盘复制到硬盘,并在 my.cnf我有这条线:datadir = /media/seagate/mysql.

标签: mysql raspberry-pi locking mariadb


【解决方案1】:

为什么日志包含旧 mysql 数据文件夹的路径对我来说仍然是一个谜。 (连之前的U盘都不是,为了让故事更完整,其实是我之前用的U盘!)但是,问题解决了!答案实际上比我想象的要简单得多,事实证明,我的兄弟卸载了一些东西(他说是一个玩旧游戏的模拟器),当他注意到它卸载了 mariadb-server-10.0(奇怪! )。所以我做了一个简单的sudo apt-get install mariadb-server-10.0,你猜怎么着!它解决了我的问题! :D

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-08-14
    • 2017-03-02
    • 1970-01-01
    • 2012-10-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多