Everything I find on the net tells me to provide the database user and password to connect to the database.
Being paranoid as usual, I don’t like this because it means anybody that has the php source can now log into the database and screw with the data. Is this the only way to access the database?
context: http://www.cyberciti.biz/tips/facebook-source-code.html
Since PHP will be parsed by the interpreter and only HTML will be output, you need not fear as there will be no way to get hold of the PHP source (guessing that you have set appropriate measures so that the PHP source cannot be downloaded).
Block all traffic to the MySQL server from outside. Only allow localhost to use it.