Category Archives: MySQL

MySQL 5.7+ STRICT mode

If you have a project that is so old and so broken but you have to maintain anyway, but you are developing locally using MySQL 5.7+, just run this on your MySQL console to remind yourself how poorly coded your … Continue reading

Posted in MySQL | Leave a comment

Liquibase – Source control for your database

Many PHP, Python and Ruby frameworks already have their database source control feature either built-in or supported as a plugin. In our case, we didn’t use (PHP) CodeIgniter’s built-in database migration tool nor use any migration tool at all until … Continue reading

Posted in Database, MySQL, Web Development | Tagged , , , , | Leave a comment

MySQL – Locking reads using transaction

Here is a quick post before I hit work on a Sunday afternoon. I was trying to create some sort of locking mechanism designed to trigger the same tasks from multiple clients but only one should be executed/run. I tried … Continue reading

Posted in Database, MySQL, Web Development | Tagged , | Leave a comment

Default to utf8 encoding for MySQL 5.5

Been banging my head several times trying to set the correct configuration for setting utf8 as default encoding for my MySQL database. Searching the web shows old configuration that is not compatible with MySQL 5.5. However, I’ve found one that … Continue reading

Posted in MySQL | Tagged , , | Leave a comment

Changing URL – WordPress and Moving to a new domain

If you have a blog that is up for few years already and suddenly you decided to move to a new domain / url, you end up changing all the link from config, to post contents and to comments. Using … Continue reading

Posted in MySQL, WordPress | Tagged , , , , , , | Leave a comment

Updating Multiple Rows in MySQL

There comes a time when you need to update multiple rows with different values. You can update multiple rows with the same value, but when dealing with different values for different rows, it becomes a difficult task. Yes there are … Continue reading

Posted in Database, MySQL, SQL | Tagged , , , , , , , | Leave a comment

Making MySQL 5.1 Dump Compatible with MySQL 5.0

While posting this, the process of restoring a MySQL dump is still running. When all you have is a MySQL 5.1 dump and you need to restore it to a server running MySQL 5.0, you’re out of luck, because MySQL … Continue reading

Posted in Database, MySQL | Tagged , , , , , , | 2 Comments

MySQL Backup Strategy

The Story A few months ago, while at home, my supervisor called me. The incident was that our client’s QR System stops working on a certain module. I learn that the possible cause was a table corruption, so the the … Continue reading

Posted in Database, MySQL | Tagged , , , , , , , | Leave a comment

MySQLDump In Many Many Ways

Again, there is another need to blog this thing. I encountered this situations where dumping the database using default options does not fit the purpose, so today, we will be playing with mysqldump options for making MySQL backup. Simple Backup … Continue reading

Posted in MySQL | Tagged , | 2 Comments

Importing Huge CSV File to MySQL via PHP

Yes there are several techniques to import CSV to MySQL. I have encountered this task several times already the those previous experiences worked out seamlessly, but this one is a bit complicated and requires a lot of effort in order … Continue reading

Posted in Linux, MySQL, php | Tagged , , , , , | 3 Comments