[Solved]MySQL Could not connect after Password Change

General questions relating to Joomla! 1.5 There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
User avatar
j2o
Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Wed Feb 01, 2006 10:47 am
Location: UK
Contact:

[Solved]MySQL Could not connect after Password Change

Post by j2o » Fri Mar 08, 2013 3:06 pm

Hi Guys,

Got a strange issue here, a friends website was running 1.5 and got hacked, so I changed the ftp password/mysql password and updated 1.5 to the latest patch.

I updated the configuration file with the new MySQL password (and double checked all details) but the website now wont connect? It was working fine before?

I also tested some php code:

Code: Select all

<?php
$host = '--------';
$user = '--------';
$pass = '--------';
$db = '--------';

//Don't change below here
$conn = mysql_connect($host, $user, $pass);
mysql_select_db($db, $conn);
echo '<hr />anything above this linebreak is BAD!';
And the php file seems to work without displaying any errors which makes me think its a Joomla issue. I have asked to contact the host and see if they will know anything but I dont know what else to try..?

Any help is really appreciated

Thanks
Last edited by j2o on Sat Mar 09, 2013 7:22 am, edited 1 time in total.

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12781
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: MySQL Could not connect after Password Change

Post by brian » Fri Mar 08, 2013 5:37 pm

The ONLY way this can happen is if you did not enter the correct details in the configuration.php file.
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
j2o
Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Wed Feb 01, 2006 10:47 am
Location: UK
Contact:

Re: MySQL Could not connect after Password Change

Post by j2o » Sat Mar 09, 2013 7:20 am

Hi Brian,

Thanks for your help.

Actually, it turns out its a bit of both, the config file i was uploading was correct but it was not overwriting the file on the server correctly, so when you viewed the file via ftp it still had the wrong mysql password! strange...

The solution was to rename the old config file and re-upload the correct one..

Thanks
Jay

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12781
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: [Solved]MySQL Could not connect after Password Change

Post by brian » Sat Mar 09, 2013 9:39 am

Glad you got there in the end.
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/


Locked

Return to “General Questions/New to Joomla! 1.5”