[ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
CentOS環境下啟動mysql服務報錯:
[root@jzh ~]# service mysql start
Starting MySQL.......................................................................................................... ERROR! The server quit without updating PID file (/var/lib/mysql/jzh.pid).
日誌檔案內容如下:
2015-05-19 09:28:19 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:19 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:20 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:20 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:21 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:21 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:22 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:22 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:23 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:23 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:24 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:24 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:25 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:25 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:26 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:26 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:27 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:27 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:28 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:28 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:29 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:29 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:30 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:30 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:31 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:31 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:32 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:32 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:33 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:33 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
錯誤顯示不能lock ./ibdata1這個檔案,建議檢查是否有其他mysqld程式在使用相同的InnDB data或者日誌檔案,於是檢查mysql相關程式:
[root@jzh ~]# ps -ef | grep mysql
root 1945 1 0 08:35 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/jzh.pid
mysql 2079 1945 0 08:35 ? 00:00:05 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/jzh.err --pid-file=/var/lib/mysql/jzh.pid
root 10935 2739 0 09:27 pts/1 00:00:00 /bin/sh /sbin/service mysql start
root 10940 10935 0 09:27 pts/1 00:00:00 /bin/sh /etc/init.d/mysql start
root 10948 10940 0 09:27 pts/1 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/jzh.pid
mysql 11082 10948 0 09:27 pts/1 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/jzh.err --pid-file=/var/lib/mysql/jzh.pid
root 27245 23168 0 09:28 pts/2 00:00:00 grep mysql
果然有mysql程式已經啟動了,kill掉,再啟mysql服務成功
[root@jzh /]# service mysql start
Starting MySQL........................................................................................... SUCCESS!
[root@jzh ~]# service mysql start
Starting MySQL.......................................................................................................... ERROR! The server quit without updating PID file (/var/lib/mysql/jzh.pid).
日誌檔案內容如下:
2015-05-19 09:28:19 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:19 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:20 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:20 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:21 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:21 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:22 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:22 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:23 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:23 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:24 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:24 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:25 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:25 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:26 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:26 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:27 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:27 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:28 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:28 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:29 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:29 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:30 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:30 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:31 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:31 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:32 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:32 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-05-19 09:28:33 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-05-19 09:28:33 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
錯誤顯示不能lock ./ibdata1這個檔案,建議檢查是否有其他mysqld程式在使用相同的InnDB data或者日誌檔案,於是檢查mysql相關程式:
[root@jzh ~]# ps -ef | grep mysql
root 1945 1 0 08:35 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/jzh.pid
mysql 2079 1945 0 08:35 ? 00:00:05 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/jzh.err --pid-file=/var/lib/mysql/jzh.pid
root 10935 2739 0 09:27 pts/1 00:00:00 /bin/sh /sbin/service mysql start
root 10940 10935 0 09:27 pts/1 00:00:00 /bin/sh /etc/init.d/mysql start
root 10948 10940 0 09:27 pts/1 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/jzh.pid
mysql 11082 10948 0 09:27 pts/1 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/jzh.err --pid-file=/var/lib/mysql/jzh.pid
root 27245 23168 0 09:28 pts/2 00:00:00 grep mysql
果然有mysql程式已經啟動了,kill掉,再啟mysql服務成功
[root@jzh /]# service mysql start
Starting MySQL........................................................................................... SUCCESS!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10271187/viewspace-1663122/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- mysql之 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11MySqlError
- [ERROR] InnoDB: ibdata1 different size (rounded down to MB)Error
- Oracle Database on NFS : unable to lock file - already in use" ErrorOracleDatabaseNFSError
- mysql [ERROR] InnoDB: ./ibdata1 can't be opened in read-write modeMySqlError
- master bug InnoDB Error unlock row could not find a 4 mode lockASTError
- 打補丁報錯Opatch error : "Unable to lock Central InventoryError
- (Error -1170 @ 0x0) Unable to access the DAP)Error
- ERROR FIX:- rpmdb: unable to join the environmentError
- ERROR 1168 (HY000): Unable to open underlying table which isError
- mysql錯誤: [ERROR] InnoDB: auto-extending data file /data/ibdata1 is of a different size 768 pages...MySqlError
- pip install scrapy報錯:error: UnableError
- Fatal error in launcher: Unable to create process using '"'Error
- error:unable to get logical block size for spfileErrorBloC
- mysqldump: Got error: 1168 differently defined non-MyISAM LOCK TABLESMySqlGoError
- nodejs gm ImageMagick Error unable to read fontNodeJSError
- android studio Error:Unable to start the daemon process【轉】AndroidError
- InnoDB: Error: space id and page n:o stored in the page?Error
- 【MySQL】5.6.x InnoDB Error Table mysql.innodb_table_stats not foundMySqlError
- rabbitMq的status報錯Error: unable to perform an operation on node ‘rabbit……MQErrorORM
- [GuzzleHttp\Exception\RequestException] cURL error 60: SSL certificate problem: unable to get localHTTPExceptionError
- Question : ERROR 1130 (00000)Error
- ''Sbt Error = 7011, Errno = 959'' Error When Backing Up To TapeError
- unable to get file lock, will retry ...
- Unable to create git index lockGitIndex
- X11Window X11 ErrorError
- Mysql報錯Fatal error:Can't open and lock privilege tablesMySqlError
- 終端報錯"xcrun: error: unable to find utility “xcodebuild”, not a developer tool orErrorXCodeUIDeveloper
- MySQL 5.7.17 安裝報錯SSL error: Unable to get private key fromMySqlError
- kkjcre1p: unable to spawn jobq slave process, error 1089Error
- CDH5之Unexpected error.Unable to verify database connectionH5ErrorDatabase
- alter table engine=memory ERROR 1114Error
- mysql 啟動錯誤(InnoDB: Operating system error number 13 )MySqlError
- 【ubuntu】解決Unable to determine the device handle for GPU 0000:02:00.0: Unknown ErrorUbuntudevGPUError
- The innodb_system data file 'ibdata1' must be writable
- MySQL啟動報錯InnoDB: The innodb_system data file './ibdata1' is of a differentMySql
- innodb_autoinc_lock_mode
- ERROR 1114 (HY000) The table '' is fullError
- mysql innodb lock鎖之record lock之一MySql