# Help PLEASE! Error establishing a database connection

**URL:** <https://forum.infinityfree.com/t/help-please-error-establishing-a-database-connection/9030>\
**Category:** Hosting Support\
**Created:** [April 6, 2018, 5:54am UTC](https://forum.infinityfree.com/t/help-please-error-establishing-a-database-connection/9030 "2018-04-06T05:54:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![eaglemdeouy](https://forum.infinityfree.com/letter_avatar/eaglemdeouy/32/6_22734026db12803ebb3e059622ac3534.png) [@eaglemdeouy](https://forum.infinityfree.com/u/eaglemdeouy)\
**Post date:** [April 6, 2018, 5:54am UTC](https://forum.infinityfree.com/t/help-please-error-establishing-a-database-connection/9030/1 "2018-04-06T05:54:36Z")

</div>

please help, I have transfered my Database and files from my local server successfully, and I have also done the normal configuration of the wp-config.php. But each time i try to access my site what i see is Error establishing a database connection. [programasgratiscomkeys.epizy.com](http://programasgratiscomkeys.epizy.com)  
My username epiz\_21869213

---

<div class="post-metadata">

**Author:** ![anon84130465](https://forum.infinityfree.com/letter_avatar/anon84130465/32/6_22734026db12803ebb3e059622ac3534.png) [@anon84130465](https://forum.infinityfree.com/u/anon84130465)\
**Post date:** [April 6, 2018, 5:59am UTC](https://forum.infinityfree.com/t/help-please-error-establishing-a-database-connection/9030/2 "2018-04-06T05:59:29Z")

</div>

Are you sure you’re entering correct credentials?

Database user should be your username ‘epiz\_21869213’

Database name should be: epiz\_21869213\_name

Database password should be your cPanel password.

Database host should be sql###.something.

---

<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:** [April 6, 2018, 7:13am UTC](https://forum.infinityfree.com/t/help-please-error-establishing-a-database-connection/9030/3 "2018-04-06T07:13:09Z")

</div>

A good first step to solve issues like this is to enable debug mode in WordPress. To do that, find the line with `WP_DEBUG` in `wp-config.php` and change the `false` to `true`.

After refreshing the page, you should see a lot more information about why the connection failed. You can probably find the actual error message in this article: [https://infinityfree.net/support/common-mysql-errors/](https://infinityfree.net/support/common-mysql-errors/)

Don’t forget to disable `WP_DEBUG` again afterwards, it’s a security risk to have it on by default.

---

<div class="post-metadata">

**Author:** ![eaglemdeouy](https://forum.infinityfree.com/letter_avatar/eaglemdeouy/32/6_22734026db12803ebb3e059622ac3534.png) [@eaglemdeouy](https://forum.infinityfree.com/u/eaglemdeouy)\
**Post date:** [April 6, 2018, 9:09am UTC](https://forum.infinityfree.com/t/help-please-error-establishing-a-database-connection/9030/4 "2018-04-06T09:09:17Z")

</div>

Hello! Thank you both for answering. I solved that the problem was that the host was wrong, the host that I had was the one I had when I made the backup.

---

<div class="post-metadata">

**Author:** ![eaglemdeouy](https://forum.infinityfree.com/letter_avatar/eaglemdeouy/32/6_22734026db12803ebb3e059622ac3534.png) [@eaglemdeouy](https://forum.infinityfree.com/u/eaglemdeouy)\
**Post date:** [April 6, 2018, 9:10am UTC](https://forum.infinityfree.com/t/help-please-error-establishing-a-database-connection/9030/5 "2018-04-06T09:10:43Z")

</div>

> @VPHrishikesh said:  
> Are you sure you’re entering correct credentials?
> 
> Database user should be your username ‘epiz\_21869213’
> 
> Database name should be: epiz\_21869213\_name
> 
> Database password should be your cPanel password.
> 
> Database host should be sql###.something.

Hello! Thank you !

---

<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:31pm UTC](https://forum.infinityfree.com/t/help-please-error-establishing-a-database-connection/9030/6 "2019-01-17T19:31:34Z")

</div>

Closed on January 17, 2019, 7:31pm UTC


