Remove all dependency on mysql extension

The mysql extension is deprecated in PHP 5.5