Followers

Friday, June 8, 2012

Database connection error (2). Using 000webhost

Database connection error (2): Could not connect to MySQL.
Problem: (Mati akal dah kemarin dengan masalah ni)
This error message generally means that my Joomla's configuration.php file has either the wrong database name or database username. Emy changed the database  password, and in each separate occasion the same error message occurred.
Figure 1: Database connection error (2): Could not connect to MySQL.
Solution:  (nasib baik jumpa solution nya dan berjaya, Alhamdulillah)
This solution is valuable to me. We should review our configuration.php file and ensure we are using the correct MySQL username and password. These settings will appear in the file as:
Figure 2: configuration.php in 000webhost file manager
Figure 3: public $password = 'cemacs123';  
public $user = 'a5812124_cemacs';
public $password = 'emylia91';

changed to 
public $password = 'cemacs123';

If you are sure the settings are correct, it is recommend to reset our database user's password and update our configuration.php file with the new password. This will help ensure that we have the correct database password set.

source: 1 / 2 / 3 / 4 / 5 / 6

3 comments:

  1. Hi,

    I loved your article very much and this article helps me a lot. I want to give a prize for this article please go to problogger.net and choose a book to download.i will bought that book for you. hope that will help you to run your blogger practice more better.

    My facebook id is : Talukdar Galib
    my email is : talukdargalib@gmail.com

    ReplyDelete
  2. can i connect nameserver to 000webhost also for php hosting purpose as i

    already taken domain from third party?

    ReplyDelete