CodeIgniter Forums
A Database Error Occurred - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: A Database Error Occurred (/showthread.php?tid=54229)



A Database Error Occurred - El Forum - 08-29-2012

[eluser]ogib[/eluser]
Hi friends,
I have a project that upload in 000webhost.com.
Database configured as follows:

Code:
$db['default']['hostname'] = 'server30.000webhost.com';
$db['default']['username'] = 'username';
$db['default']['password'] = 'pass';
$db['default']['database'] = 'database_name';

However, it gives me an error:
Unable to connect to your database server using the provided settings.
Filename: core/Loader.php
Line Number: 346


Where is my mistake? Please help!


A Database Error Occurred - El Forum - 08-29-2012

[eluser]michalsn[/eluser]
First thought - port number different from default (3306) .


A Database Error Occurred - El Forum - 08-29-2012

[eluser]ogib[/eluser]
which number to write?


A Database Error Occurred - El Forum - 08-30-2012

[eluser]ogib[/eluser]
I made the connection with the database.
I wrote the admin of 000webhost.com and gave me a new database host and now everything is OK