Latest Entries
cPanel / Linux / PHP

Can’t Open file when using LOCK Tables:

Hello readers, was little busy! here I come with a new cool trick: Sometimes while running MySQL dump, we see error: [root@kapil ~]# mysqldump -u root -p mypassword –opt sampledb > backupdb.sql [root@kapil ~]# mysqldump: Got error: 1016: Can’t open file: ‘./sampledb/xxx.frm’ (errno: 24) when using LOCK TABLES Solution: [root@kapil ~]# mysqldump -u root -p … Continue reading »

Rate this:

cPanel / Linux

Creating MySQL log file on cPanel

MySQL log file is not turned on by default. Here how you turn it on: [root@kapil ~]# vi /etc/my.cnf log-slow-queries = /var/log/mysql-slow.log long_query_time = 3 :wq You can use any file name that you want and you can modify the long_query_time to any value [root@kapil ~]# touch /var/log/mysql-slow.log [root@kapil ~]# chown mysql.root /var/log/mysql-slow.log [root@kapil ~]# /etc/init.d/mysqld restart … Continue reading »

Rate this: