How to Waiting for table metadata lock on Truncate Table

How to Waiting for table metadata lock on TRUNCATE TABLE? Problem: In MYSQL there is a long running session which is waiting for “TRUNCATE TABLE XXXXXXX” Cause: You can check the running active sessions by show full processlist; or using any explorer tools like MYSQL Workbench. To confirm which transaction is holding the truncate table. You can execute the following
Read More »

How to purge logs in MYSQL

1.Login as root or admin privileged user $ mysql -u root -p password 2. Purge the Logs with log number test$ PURGE BINARY LOGS TO “mysql-bin.0900” The above command will purge all logs before 0900 and keep the logs 900 and above 3. Purge the logs until specific date and time test$ PURGE BINARY LOGS BEFORE “2009-09-02 22:00:00”; This command
Read More »