mysql 加大 了logfile之後,遇到innodb disable的問題

bulletming發表於2019-06-02


這兩天在做mysql的效能測試,直接將my-large.cnf的檔案覆蓋了原先my.cnf(基於my-small.cnf),這其中innodb的引數,如下變化:

bullet:/data/db # diff big_inno.cnf small_inno.cnf
5,7c5,7
< innodb_buffer_pool_size = 256M
< innodb_additional_mem_pool_size = 20M
< innodb_log_file_size = 64M
---
> innodb_buffer_pool_size = 16M
> innodb_additional_mem_pool_size = 2M
> innodb_log_file_size = 5M

然後我就折騰啊折騰,測試啊測試,突然發現有個表竟然是三個檔案(MYD,MYI,FRM)的形式存在資料庫目錄下邊

我畢竟是個新手!

mysql> show engines;
+------------+----------+----------------------------------------------------------------+
| Engine | Support | Comment |
+------------+----------+----------------------------------------------------------------+
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables |
| InnoDB | DISABLED | Supports transactions, row-level locking, and foreign keys |
| BerkeleyDB | NO | Supports transactions and page-level locking |
| BLACKHOLE | NO | /dev/null storage engine (anything you write to it disappears) |
| EXAMPLE | NO | Example storage engine |
| ARCHIVE | NO | Archive storage engine |
| CSV | NO | CSV storage engine |
| ndbcluster | NO | Clustered, fault-tolerant, memory-based tables |
| FEDERATED | NO | Federated MySQL storage engine |
| MRG_MYISAM | YES | Collection of identical MyISAM tables |
| ISAM | NO | Obsolete storage engine |
+------------+----------+----------------------------------------------------------------+

mysql> show variables like 'have_innodb';
+---------------+----------+
| Variable_name | Value |
+---------------+----------+
| have_innodb | DISABLED |
+---------------+----------+
1 row in set (0.00 sec)

後來發現日誌裡邊有些報錯:

Version: '5.0.41' socket: '/tmp/mysql.sock' port: 3306 Source distribution
070625 19:16:29 InnoDB: ERROR: the age of the last checkpoint is 9433987,
InnoDB: which exceeds the log group capacity 9433498.
InnoDB: If you are using big BLOB or TEXT rows, you must set the
InnoDB: combined size of log files at least 10 times bigger than the
InnoDB: largest such row.

070626 09:30:35 mysqld started
InnoDB: Error: log file /data/db/ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 67108864 bytes!
070626 9:30:35 [Note] /usr/local/mysql5.0.41/libexec/mysqld: ready for connections.
Version: '5.0.41-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution

報錯也挺明顯的,不過也沒想到問題所在,我比較笨!

只是懷疑mysql編譯的時候是不是innodb沒編譯進來,還懷疑oracle與mysql的關係是否已經惡化....,顯示的加上--with-innodb重新編了,沒用

後來也是在 發現有人跟我有相同的鬱悶之處,(他可能更鬱悶,他按照手冊做了),然後就刪除了所有innodb相關檔案,連資料檔案,重啟就可以了。

正確的操作在這裡:

http://dev.mysql.com/doc/refman/4.1/en/adding-and-removing.html

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/82392/viewspace-144680/,如需轉載,請註明出處,否則將追究法律責任。

相關文章