Il motore INNODB non si sta caricando dopo i parametri di messa a punto
-
02-11-2019 - |
Domanda
Dopo aver installato MySQL-5.1.73, ho messo my-huge.cnf predefinito in /etc/my.cnf e ho iniziato il servizio MySQL. Funzionava senza alcun problema. Ora, ho sintonizzato alcuni parametri nel file /etc/my.cnf. Di seguito sono riportati i parametri che ho cambiato.
[mysqld]
key_buffer_size = 298M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 50
query_cache_size = 32M
query_cache_limit = 1M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 2
e non sono state rapusse queste variabili per il file predefinito innodB.in, è stato commentato che anche INNODB era attivo.
# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /var/lib/mysql
innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
innodb_log_group_home_dir = /var/lib/mysql
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 1127M
innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 256M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
Ora, per verificare se INNODB è disponibile o no, ho corso show engines
comando. Ma, InnodB non è elencato in questo. Quindi, ho eseguito il comando sotto comando:
mysql> show variables like '%innodb%';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| have_innodb | NO |
| ignore_builtin_innodb | OFF |
+-----------------------+-------+
2 rows in set (0.00 sec)
mysql> show engines;
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
7 rows in set (0.00 sec)
Non riesco a trovare dove ho fatto l'errore? Puoi aiutarti per favore?
Aggiungendo il modo in cui il problema è stato risolto ma non so che il modo è corretto o no!:
Il controllo del registro degli errori ha sicuramente aiutato qui. Sulla base del registro degli errori:
InnoDB: Error: data file /var/lib/mysql/ibdata1 is of a different size
InnoDB: 133760 pages (rounded down to MB)
InnoDB: than specified in the .cnf file 128000 pages!
InnoDB: Could not open or create data files.
Then, I commented - #innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
Dopo questo, ho ottenuto il messaggio di errore sotto il file di registro di errore:
InnoDB: Error: log file /var/lib/mysql/ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 268435456 bytes!
140430 17:13:37 [ERROR] Plugin 'InnoDB' init function returned error.
140430 17:13:37 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Then, I commented #innodb_log_file_size = 256M By default #innodb_log_file_size = 5M.
Ora, ho nuovamente iniziato il servizio MySQL e ho scoperto che InnoDB è stato caricato come motore predefinito.
Nessuna soluzione corretta