Welcome Guest, Not a member yet? Register   Sign In
Unable to connect to your database server using the provided settings.
#1

[eluser]RRosset[/eluser]
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

Code:
$active_group = "default";

$db['default']['hostname'] = "IP_ADDRESS";
$db['default']['username'] = "USERNAME";
$db['default']['password'] = "PASSWORD";
$db['default']['database'] = "DATABASE";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['active_r'] = TRUE;
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE; // SET TO TRUE
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";

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!

Bob
#2

[eluser]Derek Allard[/eluser]
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?
#3

[eluser]CI Lee[/eluser]
Have you resolved this error? Who are you using for a host, maybe someone hear uses the same and can shed some light....

-Lee
#4

[eluser]RRosset[/eluser]
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!
#5

[eluser]gtech[/eluser]
firewall blocking issue?
#6

[eluser]RRosset[/eluser]
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! Tongue

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.
#7

[eluser]RRosset[/eluser]
Guys, i tried a manual connection:

Code:
$sql = mysql_connect('IP', 'USER', 'PASS');
if (!$sql) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($sql);
die;

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 shit... but if i run the code of server B IN server B, then it works... dang dang dang.
#8

[eluser]RRosset[/eluser]
Kay guys, i think everything is pointing to my first idea: 'set password'

But this command doesn't work for me.

Code:
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 Confusedad:
#9

[eluser]RRosset[/eluser]
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.
#10

[eluser]Unknown[/eluser]
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.

Jeff




Theme © iAndrew 2016 - Forum software by © MyBB