mysql [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode
最近開始研究mysql,有一臺伺服器,第一次部署時有一些配置檔案的路徑有問題,打算重新部署,因為mysql用的二進位制安裝方式,刪除了mysql目錄,重新部署是報錯:
# ./scripts/mysql_install_db --defaults-file=/etc/my.cnf --user=mysql
Installing MySQL system tables...2015-05-29 11:18:38 16020 [Note] InnoDB: The InnoDB memory heap is disabled
2015-05-29 11:18:38 16020 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-05-29 11:18:38 16020 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-05-29 11:18:38 16020 [Note] InnoDB: Using Linux native AIO
2015-05-29 11:18:38 16020 [Note] InnoDB: Using CPU crc32 instructions
2015-05-29 11:18:38 16020 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-05-29 11:18:38 16020 [Note] InnoDB: Completed initialization of buffer pool
2015-05-29 11:18:38 16020 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode
2015-05-29 11:18:38 16020 [ERROR] InnoDB: The system tablespace must be writable!
2015-05-29 11:18:38 16020 [ERROR] Plugin 'InnoDB' init function returned error.
2015-05-29 11:18:38 16020 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2015-05-29 11:18:38 16020 [ERROR] Unknown/unsupported storage engine: InnoDB
2015-05-29 11:18:38 16020 [ERROR] Aborting
2015-05-29 11:18:38 16020 [Note] Binlog end
2015-05-29 11:18:38 16020 [Note] ./bin/mysqld: Shutdown complete
看著很像許可權的問題,但是檢查後發現,許可權很正常,google一下
原來是datadir下的問題,刪除data目錄下的ib_logfile0和ib_logfile1檔案,就可以了,因為是重新部署,所以我把datadir清空了,再次執行安裝指令碼,成功,make一下。
# ./scripts/mysql_install_db --defaults-file=/etc/my.cnf --user=mysql
Installing MySQL system tables...2015-05-29 11:18:38 16020 [Note] InnoDB: The InnoDB memory heap is disabled
2015-05-29 11:18:38 16020 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-05-29 11:18:38 16020 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-05-29 11:18:38 16020 [Note] InnoDB: Using Linux native AIO
2015-05-29 11:18:38 16020 [Note] InnoDB: Using CPU crc32 instructions
2015-05-29 11:18:38 16020 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-05-29 11:18:38 16020 [Note] InnoDB: Completed initialization of buffer pool
2015-05-29 11:18:38 16020 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode
2015-05-29 11:18:38 16020 [ERROR] InnoDB: The system tablespace must be writable!
2015-05-29 11:18:38 16020 [ERROR] Plugin 'InnoDB' init function returned error.
2015-05-29 11:18:38 16020 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2015-05-29 11:18:38 16020 [ERROR] Unknown/unsupported storage engine: InnoDB
2015-05-29 11:18:38 16020 [ERROR] Aborting
2015-05-29 11:18:38 16020 [Note] Binlog end
2015-05-29 11:18:38 16020 [Note] ./bin/mysqld: Shutdown complete
看著很像許可權的問題,但是檢查後發現,許可權很正常,google一下
原來是datadir下的問題,刪除data目錄下的ib_logfile0和ib_logfile1檔案,就可以了,因為是重新部署,所以我把datadir清空了,再次執行安裝指令碼,成功,make一下。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14184018/viewspace-1676475/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [ERROR] InnoDB: ibdata1 different size (rounded down to MB)Error
- MySQL啟動報錯InnoDB: The innodb_system data file './ibdata1' is of a differentMySql
- MySQL報錯Table 'plugin' is read only [ERROR] Can't open the mysql.plugin table.MySqlPluginError
- MySQL 2003 - Can’t connect to MySQL server on (10060)MySqlServer
- Error:Can't connect to SOCKS proxy:Connection refused (Connection refused)Error
- [ERR] 1231 - Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'SQL
- [ERROR] mysqld: Can‘t open shared library ‘/usr/local/mysql/lib/plugin/validate_password.so‘ (errno:ErrorMySqlPlugin
- Fatal error: can't check configuration file '/home/watt/proxy/dError
- 解決ERROR 1231 (42000): Variable 'time_zone' can'tError
- mysql遇到Variable can’t be set to the value of ‘NULL’MySqlNull
- GTID複製報錯處理:Last_Error: Error 'Can't drop database 'test';ASTErrorDatabase
- 完美解決stack Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.ErrorPython
- linux下連線mysql報錯ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysqLinuxMySqlErrorServer
- Mysql:Variable 'XXXt' can't be set to the value of 'NULL'解決MySqlNull
- MYSQL報1022錯誤:Can't write;duplicate key in table '.....'MySql
- mysql中You can’t specify target table for update in FROM clMySql
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock錯誤MySqlServer
- mysql ibdata1太大的原因MySql
- mysql 啟動錯誤(InnoDB: Operating system error number 13 )MySqlError
- mysql 啟動報錯Can't connect to local MySQL server through socket '/data/mysql/mysql/mysql.sock'(111)MySqlServer
- pipenv install error UnicodeDecodeError: 'utf8' codec can't decode byte 0xb4 in positionErrorUnicode
- pip install ... ERROR: UnicodeDecodeError: ‘gbk‘ codec can‘t decode/ python setup.py egg_info CheckErrorUnicodePython
- TypeError: can‘t concat str to bytesError
- Can't open file: (errno: 24)
- Can't Connect to MySQL Server on IP Address (10061) 錯誤的解決方案MySqlServer
- MySQL自增列鎖模式 innodb_autoinc_lock_mode不同引數下效能測試MySql模式
- ibdata1檔案損壞時恢復InnoDB單表測試
- Supervisor 解決 can't find command *
- Mongoose can't update timestampGo
- MySQL Strict SQL MODEMySql
- mysqld: Can‘t create directory ‘E:\Software\mysql-5.7.24-winx64\data\‘ (Errcode: 2 - NoMySql
- eslint --fix 報錯 can't not find modulesEsLint
- Can't load IA 32-bit .dll on a
- multiprocessing pool AttributeError: Can't get attribute 'func'Error
- already opened by ClassLoader
- MySQL Deadlocks in InnoDBMySql
- MySQL InnoDB 索引MySql索引
- Python——UnicodeEncodeError: 'ascii' codec can't encode/decode charactersPythonUnicodeErrorASCII
- redis : Can't save in background: fork: Cannot allocate memoryRedis