# Help! I cannot connect to my database!

**URL:** https://forum.infinityfree.com/t/help-i-cannot-connect-to-my-database/7649
**Category:** Hosting Support
**Created:** [October 5, 2017, 8:27pm UTC](https://forum.infinityfree.com/t/help-i-cannot-connect-to-my-database/7649 "2017-10-05T20:27:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Admin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/admin/32/36437_2.png) [@Admin](https://forum.infinityfree.com/u/Admin)
#### Post date: [October 5, 2017, 8:27pm UTC](https://forum.infinityfree.com/t/help-i-cannot-connect-to-my-database/7649/1 "2017-10-05T20:27:30Z")

</div>

A commonly occurring issue is that people are unable to connect to the databases they created. Here is a short checklist

#### Make sure you are using your hosting account password.

The most common issue is that people are not using the right database password. You should use the **hosting account password** in your script configuration. Important: the hosting account password **is not your client area password**.The hosting account password is randomly generated when you create an account, and you can find or change it in your client area (click the account in the accounts list).

#### Make sure you are using the right database hostname (not localhost).

Most hosting providers use `localhost` for the database hostname. This does not work for InfinityFree. In most cases, the database hostname looks like `sql123.epizy.com`. You can find your database hostname in your control panel in the MySQL Databases section.

#### Make sure you are using the right database name and username.

Your database name and database username can be found in the MySQL Databases in the Control Panel of your hosting account. The database username typically looks like `epiz_12345678` and the database name looks like `epiz_12345678_mydb`.

#### I’m sure I’m using the right database credentials.

If you’re completely sure you are using the right database password, database hostname, database name and database username, but you are still unable to connect to your database, you can get help by opening a new forum discussion. When doing so, please don’t forget to include the full error message returned by the database connection code.

---

<div class="post-metadata">

### Author: ![system](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b024fd3fa88bae093c9576e55c2c94e33f890206.svg) [@system](https://forum.infinityfree.com/u/system)
#### Post date: [January 17, 2019, 7:29pm UTC](https://forum.infinityfree.com/t/help-i-cannot-connect-to-my-database/7649/2 "2019-01-17T19:29:16Z")

</div>


