Linux * MySQL

Enable MySQL slow query log

The slow query log consists of SQL statements that took more than long_query_time seconds to execute and required at least min_examined_row_limit rows to be examined. It is very helpful in troubleshooting bad queries. Add the following to /etc/my.cnf file to enable the slow query log: Code:  log-slow-queries=/var/lib/mysql/slow.log After that, then do the following commands to […]

Linux * MySQL

ERROR 1153 : Got a Packet Bigger Than ‘Max_allowed_packet’ Bytes”

You may have come across this error before while trying to restore mysql databases, it can be easily fixed by increasing max_allowed_packet value. Check the current value first. Get into mysql prompt and enter the following query :select @@max_allowed_packet;Then you can increase the value either by adding the variable in my.cnf file or executing the […]

Linux * MySQL

Innodb disabled – MySQL

First check for any disable options for innodb in /etc/my.cnf like skip-innodb and remove them if there is any. Then restart mysql: If that doesn’t work, try # /etc/init.d/mysql stop # mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bak # mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bak # /etc/init.d/mysql start  To check, get into mysql prompt and use the command : > show engines; […]