Page 1 of 1

mysql_connect()

Posted: Sun Mar 14, 2010 1:00 pm
by miket3
My host recently forced me to change my password for stricter security. After changing the password, My PHP script stopped connecting to mysql db.

I defined the constants just above this code below.
$con = mysql_connect(MYSQLHOST,MYSQLUSER,MYSQLPASSWORD);
mysql_select_db(MYSQLDB);


How do I make it so that MYSQL access is independent of my HOST admin password? Is there a PHP function that can grab the current password instead of hard coding it? I know this can be done because other applications didn't fail?

There must be a way to grab the HOST CPANEL password..... Or can I just eliminate the parameters from the mysql_connect() function?

Thanks,
Mike.

Re: mysql_connect()

Posted: Sun Mar 14, 2010 2:40 pm
by miket3
Got it. I was using my cpanel login name as the dbuser name. DUH!