Database connection error (2): Could not connect to MySQL.

Discussion regarding Joomla! 2.5 Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
keyboard-man
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Tue Mar 10, 2015 12:04 am
Contact:

Database connection error (2): Could not connect to MySQL.

Post by keyboard-man » Fri May 22, 2015 4:13 pm

Hi all,

I sold my website yesterday, the new owner changed the phpmyadmin password and the configuration.php password but once he did he got this error Database connection error (2): Could not connect to MySQL.
and when he put the old password back it works, anyone know why this happen ? any idea or advice please ?
thank you in advance
arabic keyboard website created with joomla http://www.clavierarabe.info/
Therapy massage website created with joomla http://www.massagecasablanca.com/

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 28216
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Database connection error (2): Could not connect to MySQ

Post by imanickam » Fri May 22, 2015 4:45 pm

Because the database password is stored in the file configuration.php. The variable is $password

The user can change the password in the Global Configuration and then change it in the database.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged

keyboard-man
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Tue Mar 10, 2015 12:04 am
Contact:

Re: Database connection error (2): Could not connect to MySQ

Post by keyboard-man » Fri May 22, 2015 5:25 pm

Thank you for your answer, but this is what he already did, he changed the password in configuration.php various time in both Global Configuration and in the database but it doesnt work , but when he come back to the old password it works
Last edited by keyboard-man on Fri May 22, 2015 9:06 pm, edited 1 time in total.

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 28216
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Database connection error (2): Could not connect to MySQ

Post by imanickam » Fri May 22, 2015 5:37 pm

Whether the user changes the database username as well? If the answer is Yes then the user has to GRANT ALL PRIVILEGES to the new username.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged

keyboard-man
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Tue Mar 10, 2015 12:04 am
Contact:

Re: Database connection error (2): Could not connect to MySQ

Post by keyboard-man » Fri May 22, 2015 9:05 pm

no he did not changed database username, because in this hosting you only create new database username, you cant change new one , he only tried to change password, it's strange because with the older password it work, but whi a new one it doesnt


Locked

Return to “Performance - Joomla! 2.5”