EllisLab text mark
Advanced Search
Unable to connect to your database server using the provided settings.
Posted: 06 November 2007 06:50 PM
Joined: 2007-07-24
11 posts

As you can read in the title, i’m getting this error:

An Error Was Encountered

Unable to connect to your database server using the provided settings.

My database.php

$active_group "default";

$db['default']['db_debug'TRUE// SET TO TRUE

I’ve got another site in the exact same server. So, i have site 1 with error, let’s call it A, and site 2 without errors, let’s call it B.

I set in site A the code i paste before, and i get an error, i paste the code from site B and i get an error.

Now… in site B, the original code is working, but as soon as i use the code of site A, dang! same error!

I’m totally lost on this. I searched google, CI forums and nothing… tried some solutions setting new OLD_PASSWORD but nothing (i get an error from this).

MySQL Server version: 4.1.22

Hope you can help me guys!


Posted: 07 November 2007 12:03 AM   [ # 1 ]   [ Rating: 0 ]
Joined: 2006-03-23
3194 posts

I’d suggest you go back to your host and ask them to clarify your db information.  Is it possible that it doesn’t connect by IP address?


DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design

Posted: 07 November 2007 02:25 AM   [ # 2 ]   [ Rating: 0 ]
Joined: 2007-02-08
409 posts

Have you resolved this error? Who are you using for a host, maybe someone hear uses the same and can shed some light….



you’ve got that sexy Canadian thing working for you… - Derek Allard

Pancake Payments | http://DearIE6.com

Posted: 07 November 2007 07:00 AM   [ # 3 ]   [ Rating: 0 ]
Joined: 2007-07-24
11 posts

The funny thing is I connected a few databases, and the other guys here too. About 15 or 20 sites to the same server. But this one…

Btw Derek, i’m able to connect with MySQL Front. So IP Connection is working fine.
And CI Lee. Lemme go to the office and tell you the host. I’m at home right now.

Anyway. For the moment, i’m using a local MySQL server but i need to solve this asap cause my deadline is in 12 days and sooner or later i must change everything to the online MySQL. And also i don’t know why my other MySQL database which is working on the other server, doesn’t work for the first server (A in my example)

TTYL Guys!

Posted: 07 November 2007 07:16 AM   [ # 4 ]   [ Rating: 0 ]
Joined: 2007-09-25
833 posts

firewall blocking issue?

Posted: 07 November 2007 09:01 AM   [ # 5 ]   [ Rating: 0 ]
Joined: 2007-07-24
11 posts

Dang, the txt file they sent to us doesn’t show the server. It’s hsphere, but i think it’s a server administration tool or something like that. And GTech, I don’t think it’s a firewall issue since the other site is working fine. Hummmmm well, i slept for almost 8 hours, so I got new energies to face the problem. Any suggestion will be appreciated! raspberry

Just in case. After the first error, I delete the DB and create a new one, with new users, pass, and everything…

Do you know guys how to change the new password style to the old one or viceversa without being an admin of the MySQL server? I mean, i’m a dba of one db, but i get an error when i use set password command.

Posted: 07 November 2007 09:21 AM   [ # 6 ]   [ Rating: 0 ]
Joined: 2007-07-24
11 posts

Guys, i tried a manual connection:

$sql mysql_connect('IP''USER''PASS');
if (!
die('Could not connect: ' mysql_error());
echo 'Connected successfully';

And i get this error:

Message: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client

I tested the server B and same ####… but if i run the code of server B IN server B, then it works… dang dang dang.

Posted: 07 November 2007 10:16 AM   [ # 7 ]   [ Rating: 0 ]
Joined: 2007-07-24
11 posts

Kay guys, i think everything is pointing to my first idea: ‘set password’

But this command doesn’t work for me.

update user set password=old_password('PASSWORD'where user='USET@HOST';
flush privileges

and i get this error:
#1146 - Table ‘fairtra_db.user’ doesn’t exist

plus, mysql forums insist on that code… but no luck at all for me :sad:

Posted: 07 November 2007 10:52 AM   [ # 8 ]   [ Rating: 0 ]
Joined: 2007-07-24
11 posts

Well guys. The problem is NOT solved. But, tired of this ‘new method’(1) in the office, I rollback to the ol’one, that means to databases, one online, one offline. When I finish my offline work, i upload the information online and that’s it. I know it’s very dissapointing not to find a solution. But since i’m not admin of the mysql server, and i’ve got multiple headaches, this is the best ‘solution’ i found.

(1) The new method is the idea of develop with only one online database, and both sites, local and live. This worked for a ASP site and they (the office) thought it was a good thing to improve. After a day and a half of headaches I was able to go back to the original method.

Thanks a lot to everyone here. You rock guys.

Posted: 30 December 2008 02:22 AM   [ # 9 ]   [ Rating: 0 ]
Joined: 2008-12-03
1 posts

had the exact same problem and found that there is a line conspicuously missing from the config file.
add this line and everything is golden.

$db[‘default’][‘port’] = “3306”;

it was written somewhere that mysql (or codeigniter) will assume port 0 without this.


Posted: 29 July 2009 04:26 AM   [ # 10 ]   [ Rating: 0 ]
Joined: 2007-03-15
43 posts

I had the same error, then I found out that the maximum connection to the database has been reached. Hopefully this can help some of those who are running into the similar problem.


geeeeek - http://ericbae.com - http://freally.com