DaB. writes:
..., you should never insert a password (for mysql or
something) in your reposory.
At
http://hemlock.knams.wikimedia.org/~purodha/sample/dbaccess.php?uselang=en
there is a demo php application accessing the data base server
without a need to know a passport.
Click the "progam source" link, and inspect function dbaccess()
It reads your .my.cnf file. Error handling is limited.
Greetings.
Purodha