Category: Databases

MySQL Defrag Script

Here’s a great script for optimizing MySQL tables: http://www.dufault.info/blog/a-script-to-optimize-fragmented-tables-in-mysql/ You can install and run with:

Read More »

Force MySQL to UTF-8 Encoding

Recently learned that mysql-proxy does to issue SET statements to read-only slaves when doing read/write splitting. This create a problem when the client wants to set the character set. The work around is to force all connections to the server

Read More »

Change MySQL InnoDB Log File Size

Here’s my procedure for changing innodb_log_file_size: SET GLOBAL innodb_fast_shutdown = false; SET GLOBAL innodb_max_dirty_pages_pct = 0; /sbin/service mysqld restart /sbin/service mysqld stop rm -f /var/lib/mysql/ib_logfile[01] Edit /etc/my.cnf and set new value for innodb_log_file_size /sbin/service mysqld start Here’s a handy sql

Read More »

Setup MySQL To Start On Boot

By default most MySQL RPM packages do not set the MySQL server to start automatically on boot so this needs to be done manually. On RedHat/CentOS the chkconfig command should be used as follows:

Read More »

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.