|Database Password Change Connection Lost with website Godaddy Hosting|
Database Password Change Connection Lost with website Godaddy Hosting
| 4:41 pm on Apr 28, 2010 (gmt 0)|
I would appreciate it if someone can help me with this, my site is hosted by godaddy and I changed the database password and I lost the connection between the database and the website. Can someone please guide me through how I can reestablish the connection between the website and the database using the new password? I am not PHP, MySQL or database expert, I appreciate your help
| 5:04 pm on Apr 28, 2010 (gmt 0)|
Did you change the password in the scripts connecting to this database? That's probably all it is.
Somewhere in the scripts you should find a configuration file. For most PHP scripts, it's (generally) a directory named conf or something, like
and you'll find a config file in there. Variables are generally set like so:
$database_name = 'my_database';
$database_host = 'mysql.example.com'; // or 'localhost'
$database_user = 'my_database_user';
$database_password = 'ThI$isMyP@$$';
Other times, they will be defined as constants:
define('DB_HOST','mysql.example.com'); // or 'localhost'
You just need to update the configuration for the program. As said the above is PHP, other languages will (should) have a similar setup.
| 5:22 pm on Apr 28, 2010 (gmt 0)|
Thank you very much, I was able to find a file called config_db.php on the ftp, and it has the old password:
if($conn == true)
echo "Unable to connect";
Is this the only thing I need to change? Thanks again
| 5:23 pm on Apr 28, 2010 (gmt 0)|
Oh I changed the password from godaddy website > Hosting Panel not from any script, thank you