mysql_connect()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
miket3
Forum Newbie
Posts: 5
Joined: Sun Mar 14, 2010 12:42 pm

mysql_connect()

Post 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.
miket3
Forum Newbie
Posts: 5
Joined: Sun Mar 14, 2010 12:42 pm

Re: mysql_connect()

Post by miket3 »

Got it. I was using my cpanel login name as the dbuser name. DUH!
Post Reply