Welcome Guest, Not a member yet? Register   Sign In
Can't connect to MySQL
#1

[eluser]Buso[/eluser]
"A Database Error Occurred

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


That's all the info I get =/

My settings seems to be fine, I even created my initial 4 tables with a php script.

But when I try to run my CI application y get that error.

What's wrong?

Note: mysql version: 4.1.22-standard. Dunno if it matters.
#2

[eluser]visormatt[/eluser]
Summer Student,

Have you set up the connection settings in the following document

system->application->config->database.php

around lines 30-50?
#3

[eluser]mah0001[/eluser]
check your config/database.php, the error you are getting only occurs when one of the following settings are incorrect.

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "user";
$db['default']['password'] = "";
#4

[eluser]visormatt[/eluser]
Buso,

Also following what mah0001 is saying, if you are using a localhost make sure you have WAMP or an equivalent server running.
#5

[eluser]Buso[/eluser]
ok it works =D
#6

[eluser]mah0001[/eluser]
can you post the mysql connection code from your other php script that is working?
#7

[eluser]Buso[/eluser]
[quote author="mah0001" date="1257590050"]can you post the mysql connection code from your other php script that is working?[/quote]
yes i could..

but now it works, dun ask me why

these things happens.. right? :roll: :red:




Theme © iAndrew 2016 - Forum software by © MyBB