Home » Posts taggedmysql

Changing MySQL memory allocator to TCMalloc

For those of you who don’t know TCMalloc is short for┬áThread-Caching Malloc. It’s docs can be found here which show a more in depth view. TCMalloc can also be used with other applications via LD_PRELOAD, or by recompiling with the -ltcmalloc linker flag. If you plan on using...
Continue reading

MySQL slow query logging to table

Ever wonder how to log slow queries to a MySQL table and set an expire time? I personally hate logging slow queries to a log file. Mainly because it gets huge, spikes disk I/O and it’s not as easy to read as logging to a MySQL table. By...
Continue reading

Limit MySQL usage for a specific user

Feel the need to limit the usage of a specific user consuming too many resources without modifying global max_user_connections or max_updates etc? Luckily MySQL is smart enough to handle your needs ­čÖé The following will limit max connections, updates and questions to 1 after which additional queries will...
Continue reading

Upgrading to MySQL 5.5 Percona (cPanel/WHM)

Looking to better track and limit MySQL usage by user, CPU time and other statistics along with a performance improvement? This guide will show you how to upgrade from MySQL 5.0.x to MySQL 5.5 Percona on a cPanel/WHM server with backups of the current configuration. The following script...
Continue reading