In this tutorial:

You found this page most likely because you run Joomla 3.0 and you're getting an error on your website that is database related (joomla 2.5 database errors can be found here). We want to help you resolve this issue. Let us first tell you how the database connection is supposed to work, and then we'll try to help show you which issue is causing your problem.

How Database Connections Work in Joomla 3.0

It doesn't matter if you're running Joomla 1.0 or Joomla 3.0, the following principles apply:

1. Your Hosting Account 2. Joomla's configuration.php file

On your server, you must have:

  1. A database configured
  2. A database username and password
  3. The database user must be allowed to access the database (IE. referred to as MySQL privileges)

Your Joomla configuration.php file must match your server settings. For example:

  1. Your configuration.php file must have set the same database username and password that is set on your hosting account
  2. Your configuration.php file must have the correct database server set. Most often it is localhost, but only your hosting provider can tell you the correct answer.

If your hosting account is not setup properly with a database, or, if your Joomla configuration file is not setup with those same credentials that are setup on your host, you're going to get error messages. In this Joomla 3.0 tutorial, we are going to purposely break Joomla 3.0 and show you the error messages that result.

Error: Error displaying the error page: Application Instantiation Error

error-displaying-the-error-page-application-instantiation-errorProblem:
The following issues caused this error message to appear:

  1. The database username in our configuration.php file does not match that of what is configured on our hosting account
  2. The database password in our configuration.php file does not match what of what is configured on our hosting account
  3. The database hostname in our configuration.php file could not be connected to

Solution:
In your Joomla configuration.php file, ensure that your database username, password, and hostname match what is set / provided by your host. They will be defined in the following variables in your configuration.php file:

// database username goes here
public $user = 'database-username';
// database password goes here
public $password = 'database-password';
// database server name
public $host = 'localhost';
Continued Education in Course Joomla 3
You are viewing Section 36: 304: Troubleshooting Joomla 3.1 Database Connection Errors
Section 35: 305: How to Change your Joomla 3.1 Database Settings
Section 37: 303: How to setup ReCaptcha in Joomla 3.1
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Joomla Community Google+ Hangout #3

June 3rd, 2014

Thank you @RustyJoomla for letting me speak on the Joomla Community Google+ Hangout!

Click here to watch!

2013-05-03 2:46 am
You are so good Man! You have solved two very challenging joomla 3 problems for me: getting that horizontal menu and this Application Instantantiation error; and they were all spot-on! Many thanks for the good work.
2013-06-28 4:15 am
Thank you so much. You are a life saver! I thought I had to do several difficult procedures before I could use my website again, but you showed that it isn't that difficult at all. GREAT!
2013-07-24 1:32 pm
i already changed the configuration.php .. But sometimes i encountered this problem again and again..
because i used wamp server then i transfer the files to hostinger.ph ..
Staff
9,693 Points
2013-07-24 2:12 pm
Hello harvey,

We are happy to help you, but we would need more information to investigate further.

What is the website having the problem? Can you provide a link, so we can try to view/replicate the error?

Have you checked if your Hosting provided is aware of any known issues?

If you have any further questions, feel free to post them below.
Thank you,

-John-Paul
n/a Points
2014-08-05 8:57 pm

nuestro sitio web nos muestra el siguiente error Error displaying the error page: Application Instantiation Error: Could not connect to MySQL. me puedenen ayudar 

Our website shows the following error Error displaying the error page: Application Instantiation Error: Could not connect to MySQL. help me

Staff
9,693 Points
2014-08-05 9:44 pm
Hello jair,
Thank you for your question regarding Error displaying the error page: Application Instantiation Error: Could not connect to MySQL.I translated your question into English for our visitors.

We are happy to help, but will need some additional information. Did attempt to follow this guide?

Are you having trouble on a specific step?

Can you provide a link to your error, so we can replicate the issue?

If you have any further questions, feel free to post them below.
Thank you,

-John-Paul
2013-08-18 4:10 am
Hi,
I had hosted the files in web server.Am getting the error "Error displaying the error page: Application Instantiation Error". I had checked thoroughly with the configuration for database connection.configuration.php is made changed with the correct db name, username and password as that provided in the hosting account. Could you assist me in further processing as still getting same error.
Staff
9,968 Points
2013-08-19 3:29 pm
Hello SaranyaMareeswaran,

Unfortunately using the email address you submitted your comment under, I was unable to find an account with us to review your code.

The error you mentioned "Error displaying the error page: Application Instantiation Error" typically as explained above in the article, happens when the database information is not correct in your configuration.php file.

Are you sure that you are entering in the full correct database information? Also are you sure that after you've created your database user, that you also assign your database user to at least one database?

Please let us know if you're still having issues after verifying the correct database settings.

- Jacob
n/a Points
2014-07-22 12:27 pm

tengo el mismo problema Error displaying the error page: Application Instantiation Error: y sin duda alguna el nombre de usuario, base de datos y contraseñas son conrrectas pero el problema persiste que puedo hacer 

Staff
17,388 Points
2014-07-22 1:41 pm
Hola Edgar,

Apologies, but we do not provide support in Spanish. If we are replying, it is converted using Google Translate. So apologies for any grammatical problems with translation.

Desafortunadamente utilizando la dirección de correo electrónico que envió su comentario debajo, he podido encontrar una cuenta con nosotros para revisar su código.

El error que usted ha mencionado "Error al mostrar la página de error: La aplicación de instancias de error" típicamente como se explica en el artículo, que ocurre cuando la información de base de datos no es correcto en el archivo configuration.php.

¿Está seguro de que está entrando en la información completa base de datos correcta? También está usted seguro de que después de que usted haya creado su usuario de base de datos, que también se asigna a su usuario de la base de al menos una base de datos?

Por favor, háganos saber si usted todavía tiene problemas después de la verificación de la configuración de base de datos correcta.
2013-09-22 1:10 am
Fyi- I had the same issue. After confirming user name, password, db name, & host server- it turned out to be the table prefix. it turns out the prefix is case sensitive. Check your table prefix manually and update config file to match it. It is usually all lowercase.
n/a Points
2014-04-05 2:14 am

hi, Can I use CryptDB as a backend instead of Mysql

Staff
9,968 Points
2014-04-05 2:50 am
Hello parmesh,

It doesn't look like there is any documentation that I can find specifically for running Joomla via CryptDB, but technically it should be possible.

You would still be using MySQL as the database backend, to store an encrypted database. Then you use CryptDB as a MySQL proxy which encrypts queries and the returned data from that encrypted database.

Running Joomla with CryptDB should be possible as they tout no application changes are necessary to take advantage of the encryption. You might want to take a look at the CryptDB README for more information on how you would go about setting it up and testing.

Please let us know if you had any other questions at all.

- Jacob
n/a Points
2014-04-25 1:28 pm

Thanks for post.

n/a Points
2014-05-10 4:18 am

Error displaying the error page: Application Instantiation Error: Could not connect to MySQL.

I have changed in configuration.php with correct credientials of DB.but still error is displaying the same way. I need help to fix it. Thanks

Staff
19,601 Points
2014-05-12 1:53 pm
Hello sowmini,

There can be a couple of things that can cause this error. The first is to check and ensure the credentials are correct. If you believe they are, you will want to test the connection with a third party tool such as HeidiSQL or MySQL Workbench. Be sure that you first have set your cPanel to accept a remote connection.

If it does not connect, it may still be the credentials, you will want to reset the password for the database user and try again.

It is also a slight possibility the MySQL service was interrupted on the server. If you believe that is the case, you will want to contact our Live Support department and they can check your individual server for you.

Lastly, you may need to repair the database. You can do that via the cPanel. After repairing, try to access the site again.

Kindest Regards,
Scott M
n/a Points
2014-05-21 6:38 am

I recently moved a Joomla 3.2 website from another provider to here and still having this same problem.

I have checked the DB name, userr n password. All are correct. but still the same issue.

Please Help

Staff
9,217 Points
2014-05-21 8:52 am
I would be happy to take a look for you. Could you provide me with the website you are referring to?
n/a Points
2014-06-01 12:03 pm

Already published this more than a year ago but I am a newbie at Joomla and even more installing it.

This finally solved the problem after googling a week.

Many thanks.

 

n/a Points
2014-06-11 3:06 am

Error displaying the error page: Application Instantiation Error

this error is comming and my phpmyadmin is not opening

Staff
9,217 Points
2014-06-11 8:22 am
To resolve the issue, log into cPanel and remove the user from your MySQL database, then create a new user and associate it with that database with the correct password. From there, adjust your username and password in your configuration file to match your newly created user/password.
n/a Points
2014-07-04 2:19 am

Hi!

I had the same issue but mine was intermittent. When I load a page, I get the same error but the page finally loads after refreshing 2 or 3 times. Definitely my database information was correct but I noticed it was my database user permission. I added "delete table data" and "Create table" permission and that solved the problem.

I guess this might help someone out there.

OPMat

n/a Points
2014-08-04 6:10 am
Should also include table prefix. The table prefix in the configuration.php file, $dbprefix , must match the table prefix used in the tables; including the underscore.
n/a Points
2014-08-26 10:55 am
I believe there are instances when this error occurs intermittently. I am encountering this now, where at times my site and database connect, and other times when they do not.
Staff
19,601 Points
2014-09-28 8:51 am
Hello Kyle,

Do you happen to know on which server your site is located? There has been a server going through some maintenance issues this weekend and it may be that if you are on that particular server.

Kindest Regards,
Scott M
n/a Points
2014-09-27 8:21 am

Hey !! U all Carefull guys(just like me He he !!) ,, just upload ur databases first(o bhaiyo database to upload kr lo.....)

n/a Points
2014-10-10 4:44 am

Hi,

Having the same problem here.

I have 2 website which is (1st) is the main-domain (eg: www.website.com) and (2nd) on the sub-domain (eg: support.website.com). What I did was transfer the website files from old server to new server. then create the databases for each corresponding website and import their sql files. Checked and edit the configuration.php file. 

The (1st) website worked well but the (2nd) did not. it has a message: Error displaying the error page: Application Instantiation Error.

 

 

I've done mostly every thing that i can find on the internet but the problem persist.

Done with Double checking everything from configuration file with my database configuration. I also repaired my SQL files from phpmysql. check the permission are all check but the nothing seem to work.

 

Can anyone help me with this?

 

Thanks!

 

Jerome

 

I need expert help here.

Staff
9,693 Points
2014-10-10 9:29 am
Hello Jerome,

Thank you for your Joomla question. In our guide on Troubleshooting Joomla 3.1 Database Connection Errors, another possible cause is the database hostname in your configuration.php file could not be connected to.

I recommend checking that your hostname is available, and the server is not experiencing any issues.

If you have any further questions, feel free to post them below.

Thank you,
John-Paul
n/a Points
2014-10-29 11:51 am

Hello, I tried all steps, db, user, password, all is correct in my configuration.php, but still not working. Please help me.

Staff
17,388 Points
2014-10-29 12:07 pm
Hello Syed,

Sorry for the problems. However, since I was not able to find any information on your account and you have provided no information on the issue, it is difficult for us to begin investigating problem to provide you assistance.

Please provide us account info (if you are a customer of InMotion Hosting), server info, version information, steps to duplicate the problem, and any error messages. If you provide us this info, then we can look into the issue further to help find a solution.

Regards,
Arnel C.

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

32 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!