MySQL

Timezone database

Timezone database in SQL format associated with world countries and region with all timestamps of daylight saving time (DST).

UTF-8 and apache - mysql - php

Settings a LAMP server to work in full unicode UTF-8 :

Backup all mysql database every hour using mysqlhotcopy

My previous script using mysqldump was slowing down Apache, it became unresponsive for a few seconds, so I wrote this one using mysqlhotcopy. It's much faster and doesn't slow down my webserver.

Script to backup all mysql database and upload to FTP

In this howto I will show you a simple bash script that dump ALL mysql databases on your server compressed to GZIP and then make a nice tar.gz file with them and upload it to the FTP of your choice.

IP address geolocation SQL database

I was trying to find a free SQL database of IP geolocation with country, city, region, latitude and longitude for a project but none was accurate and up to date so I decided to create my own and now I offer it for free.

Script (php) to store coordinates of zip codes or postal codes in mysql database with Google geocode and calculate the distance between 2 locations.

The following script was designed to get distance between 2 zip codes or postal code (tested with Canada and USA). It is possible to do one by one with google API but I prefer to have the coordinates stored into my own database for speed and reliability. Once you have those coordinates, a simple function can calculate the distance between 2 location using zip/postal code.

Fix MySQL replication after reboot

I wanted to share my experience of fixing multi master MySQL replication after a long reboot. I hope it will help others :)

Shell script to backup all MySQL databases, each table in individual file and upload to remote ftp

This script will create a backup of each table in every databases (one file per table), compress it and upload it to a remote ftp.

Repair MySQL master-master replication

This is an howto that explains how to manage MySQL multimaster replication. Setting it up is fairly easy but managing it when something goes wrong can be a nightmare. Here is information that you need to know if you have a MySQL database in master master replication.