Friday 7 October 2016

mysql table is marked as crashed repair failed

mysql> repair table my_table;
+------------------------------+--------+----------+--------------------------------------------------------------------------+
| Table                        | Op     | Msg_type | Msg_text                                                                 |
+------------------------------+--------+----------+--------------------------------------------------------------------------+
| mydb.my_table                | repair | Error    | Table storage engine for 'my_table' doesn't have this option |
| mydb.my_table                | repair | error    | Corrupt                                                                  |
+------------------------------+--------+----------+--------------------------------------------------------------------------+
2 rows in set (0.00 sec)

 Go to your data directory and try running
#myisamchk -r my_table
 You should stop MySQL process first. If that doesn't work, you can try with
#myisamchk -r -v -f my_table

Wednesday 5 October 2016

Solved (without restart) Mysql slow query log is on but not logging anything


1.First cross check /etc/my.cnf to make it permanent

slow_query_log = 1
slow_query_log_file = /var/log/mysql_slow_query.log

2.Permission of

mysql mysql  763482 Oct  6 11:43 /var/log/mysql_slow_query.log

3.Slow query logging without restart mysql

login to  mysql as root
mysql> set global slow_query_log = 1;
mysql> set global slow_query_log_file = '/var/log/mysql_slow_query.log';
mysql> flush privileges;

Cheers!!!!!!!