How to obfuscate MySQL password

password-code-banner-454x84

Ever since I started using PHP and MySQL I felt a bit uncomfortable about my password being shown plain text. Here is a quick idea how to obfuscate it using base64 encoding.

/** MySQL database password */
define(‘DB_PASSWORD’, base64_decode("cGFzc3dvcmQ="));

To make it easier (and as a part of  getting familiar with Qt framework) I wrote small application to encode/decode my password:

DontLook64

Feel free to use it.

Application is written using Qt 4.5.1 framework and compiled for Windows, Mac OS and Linux.

Download:

Tags: , , , ,

3 Responses to “How to obfuscate MySQL password”

  1. Apal says:

    FYI, i just put these lines on a php file :

    the output is :
    password

    I dont get the poin, what the use of it, when someone can simply
    decode just like that.

    CMIIW

  2. Apal says:

    Line removed :

    echo base64_decode(“cGFzc3dvcmQ=”);

  3. Raf says:

    Just for those who can look over your shoulder when you edit file with settings…

Leave a Reply