Skip to main content


Apache RewriteMap with MySQL

Apache RewriteMap with MySQL

Apache rewritemap is a wonderful addon for Apache that can directly connect to a datastore and pull data dynamically. So you don’t have to depend on a scripting language (like PHP, Python) to do the rewriting/redirect for you.
Our use case was to setup “Reverse proxy” to redirect request into different sub domains based on a input URI’s parameter value. Our sub domain data are stored in MySQL tables. This is what we have done to do that,

How to automate backup for our codebase & database

Most of the sites rely on codebase & database which we can't afford to loose. We definitely need to implement a backup procedure in that case, otherwise we may loose our valuable data due to some kind of mishap (manually delete some data by mistake, software errors, hardware errors, server compromise, etc).

We can use the following shell script to make backup (codebase and database).

First let's create the backup script file:

nano /path/to/script/ 

and add the following code:

Karalmax Thu, 05/05/2016 - 05:30
How to automate backup
Mariaab along with mysql

Install Mariadb along with Mysql in Centos

MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. You can use the link to know more about MariaDB and  it's features. If you want to try MariaDB without losing MySQL, then here is the tutorial for running MariaDB alongside MySQL.

Let's start with the steps to install Mariadb along with Mysql

Restore database faster from SQL dump

At KnackForge, MySQL has been the primary choice of persistent backend storage. Late-off one of the Drupal sites we maintain had grown to accomodate thousands of contents. This inturn introduced the need for having a different strategy for backup. More details about the project will be shared in the follow up post. For this post I would like to share a simple configuration trick that helped us to speed the restoration process from SQL dump.

sivaji Wed, 04/24/2013 - 07:30
knackforge blog knowledge base
mysql mydumper backup

The specified directory is not a mydumper backup

This is one of the errors that annoyed me much at work lately. This happened when I had to restore a database from mydumper backup. If you are engaged in maintaining relatively big (in terms of data size) and dynamic database driven sites, you would have probably heard about this mighty db backup utility.


Declaring Case Sensitive MySQL text field

Simply add "CHARACTER SET binary" after the text field type declaration.


1) case insensitive:

my_field VARCHAR(255)

    case sensitive

my_field VARCHAR(255) CHARACTER SET binary

2) case insensitive:

my_field TEXT

    case sensitive:

my_field TEXT CHARACTER SET binary

Subscribe to MySQL