Relocating mysql data directory on CentOS

I had to relocate mysql data directory from OS partition to RAID partition on one of our production server which is running CentOS. Here are a few quick steps if someone else needs. 1- Create the new directory where the data has to be moved and give mysql proper rights.

2- Now stop mysql […]

read more

URL freindly key based encryption

Many of PHP developers will need this in their scripts. This code snippet make utilization of mcrypt. It encodes the data and then take base64 of it and then removes the characters returned by base64 that does not fit into URL.

    Share

read more

SQL Injection Cheatsheet

There are so many people who are looking for some quick details on this subject. I came across this very much interesting writing while browsing the Internet and reading various blogs online. I think the writer shows a lot of ways to find security holes in SQL. It is also very much useful for programmers […]

read more

URL Shortening code snippet

Last day I was wondering how goog.gl shortens URLs to 4 characters only. After doing some research I came up with following algorithm that produces URL short codes in incremental format. Incremental means: It will first give 1 character based URLs, once all possible URLs of 1 character are taken then it will give 2 […]

read more