CodeIgniter Forums
Unable to connect to database - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived General Discussion (
+--- Thread: Unable to connect to database (/thread-7322.html)

Unable to connect to database - El Forum - 04-03-2008


Just downloaded CI and ran through the intro. I am evaluating
a few frameworks, and I like what I see.

Problem is, I can't connect to a MySQL database, so I must be missing
something, or just as likely, doing something rather stupid.

I have tried all three methods described in the manual - i.e., set
the values in database.php, use autoload; set values in database.php
explicitly load by passing TRUE as 3rd param to model class. And then
tried to load explicitly from both controller and model classes.

I've tried with dbdriver set to both mysql and odbc. The results of
all of these 8 attempts have been identical. Incidently, I get the
same result when I try to use the scaffold facility.

Anyway the result that is displayed in the browser is:

An error occurred while loading
Connection to host is broken.

This is on CI 1.6.1, RHEL8, MySQL 5.0.45, unixODBC 2.2.12 PHP 5.2.4, Apache 2.2.6

If sample code will help, I will send it in.

Thanks much

Unable to connect to database - El Forum - 04-03-2008

I meant to post this in the code and dev forum, appologies.