Welcome Guest, Not a member yet? Register   Sign In
MySql Can't connect from CodeIgnitor
#1

[eluser]Auzette[/eluser]
Hey there. Just getting into PHP using CodeIgniter. I have a MySql server that is hosted that I'm attempting to create a database connection to from my PHP controller.

The error I get is

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

Filename: C:\Users\gwen\albion\system\database\DB_driver.php

I have set the settings for my database, username, password, and port in database.php. I print those out in the function in DB_Driver.php and so I know that the information is populated correctly.

Code:
Sample output I print to page:
name: albert
password: 1nacan
server: 42.8.16.73
port: 3306

I have installed MySql Workbench 5.2, and using the same settings I'm able to connect and get to the database fine.

I'm running CodeIgniter 2.1. The mysql version is 5.1.

Is there any information I can get further than "Unable to connect"? Any debug mode that will give me a more specific error that I can try and figure out precisely where the inability to connect lies? It may be that I need to provide further information, but without knowing exactly what information that is, I'm kind of shooting blindly.

Any ideas appreciated. The work in CodeIgniter has gone quite smoothly, so hopefully this is something that has a quick solution.

Thanks!




Messages In This Thread
MySql Can't connect from CodeIgnitor - by El Forum - 06-13-2012, 10:07 AM
MySql Can't connect from CodeIgnitor - by El Forum - 06-13-2012, 10:24 AM
MySql Can't connect from CodeIgnitor - by El Forum - 06-13-2012, 10:55 AM
MySql Can't connect from CodeIgnitor - by El Forum - 06-13-2012, 11:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB