homepage Welcome to WebmasterWorld Guest from 54.204.73.126
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
Database Password Change Connection Lost with website Godaddy Hosting
Database Password Change Connection Lost with website Godaddy Hosting
webcolors

5+ Year Member



 
Msg#: 4123712 posted 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

 

rocknbil

WebmasterWorld Senior Member rocknbil us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4123712 posted 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

/my-message-board/conf/

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_NAME','my_database');
define('DB_HOST','mysql.example.com'); // or 'localhost'
define('DB_USER','my_database_user');
define('DB_PASS','ThI$isMyP@$$');

You just need to update the configuration for the program. As said the above is PHP, other languages will (should) have a similar setup.

webcolors

5+ Year Member



 
Msg#: 4123712 posted 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:

<?php
session_start();
$conn=mysql_connect("00.00.00.000","USERNAME","OLD PASSWORD");
if($conn == true)
{
mysql_select_db("USERNAME",$conn);
}
else
{
echo "Unable to connect";
}

?>

Is this the only thing I need to change? Thanks again

webcolors

5+ Year Member



 
Msg#: 4123712 posted 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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved