Category Archives: MySQL

Split String in MySQL

The easiest way to split string based on the delimiter is using loop. But it is also the most inefficient way. The following is to demonstrate how to use a utility table number and a scalar function to split a … Continue reading

Posted in MySQL | Leave a comment

Change MySQL data folder on SELinux

When installing MySQL on SELinux (Security Enhanced Linux), you may get the following errors in mysqld.log if you changed the default data directory for mysql database even you granted all necessary privileges to the user mysql: 111206  1:46:00 [Warning] Can’t … Continue reading

Posted in Linux, MySQL | 10 Comments

Backup related files with Databases by ZRM for MySQL

Zmanda Recovery Manager for MySQL (ZRM for MySQL) is a robust backup and recovery solution for MySQL server. It can also be used to backup files related to databases. In the backup command mysql-zrm-backup, it has an option to specify … Continue reading

Posted in MySQL | Leave a comment

Inconsistency in view column data type

When we crate views in MySQL, the data types of the view columns should be derived from the base tables. However MySQL sometimes goes “extra miles”. USE test; DROP TABLE IF EXISTS property; CREATE TABLE property (user_id int not null, … Continue reading

Posted in MySQL | Leave a comment