Category Archives: MySQL

How to mysqldump specific tables?

This solution is from DBTODUMP=mydb SQL=”SET group_concat_max_len = 10240;” SQL=”${SQL} SELECT GROUP_CONCAT(table_name separator ‘ ‘)” SQL=”${SQL} FROM information_schema.tables WHERE table_schema=’${DBTODUMP}’” SQL=”${SQL} AND table_name NOT IN (‘t1′,’t2′,’t3’)” TBLIST=`mysql -u… -p… -AN -e”${SQL}”` mysqldump -u… -p… ${DBTODUMP} ${TBLIST} > mydb_tables.sql

Read More »

MySQL troubleshooting

Just in case you are facing downtime issues on MySQL on CentOS try these. Check if disk is full df -h if disk is full check which folder is occupying lot of space. cd / du -skh * Then go into individual folders to check if files can be deleted. If mysql/ folder looks like culprit, below steps might be useful. If mysqld.log is big, trim it. sudo echo -n > mysqld.log In case there are 1.1GB files with sequence file numbers, e.g. xxx.00001, xxx.00002…

Read More »

error: Uh oh ...