Dreamhost Database Error issue

#1
[eluser]freakish777[/eluser]
Hey All,

I'm new to PHP, CodeIgniter, and Dreamhost (professionally I'm an ASP.NET 3.5 developer, but have a friend I'm helping create a website who had already created a DreamHost account, and figured learning php is something I should get around to anyways). In any event, I've set up my database.php file with:

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "myusername";
$db['default']['password'] = "mypassword";
$db['default']['database'] = "myDBname";
$db['default']['dbdriver'] = "mysql";

and I've set up the autoloader.php file with:

$autoload['libraries'] = array('database');

Lastly in the Dreamhost panel I've set up the myusername account with access from the following hosts:

%.dreamhost.com
%
%.%.%.%
%.mywebsite.com
myipaddress


But I still receive the:

"A Database Error Occurred

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

error message. Is there something I'm overlooking?

#2
[eluser]freakish777[/eluser]
Bump.

Is anyone else here using Dreamhost and using mySQL?

#3
[eluser]Derek Allard[/eluser]
I don't think Dreamhost uses "localhost". I think its something like "name_you_setup.sitename.com". I believe its visible from your control panel.

#4
[eluser]freakish777[/eluser]
DreamHost does in fact set up a database at "myDBname.mywebsite.com" where you can use their Query/Command Line only UI to access it. However in their wiki they say to use "localhost" as the hostname (presumably because your configuration and library files will be in a directory on the site itself). I did try it with $db[‘default’][‘hostname’] = "myDBname.mywebsite.com" and it didn't work, however I may have had something else wrong at that time, I'll try it that way again in case.

EDIT: Works, thanks. I apparently got confused because their wiki says to use "localhost" when using a third party tool to connect to the database (meaning mySQL 5 or some other database software, it was somewhat late when I was doing this last night and talking with the friend who I'm helping).


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.