Dreamhost Database Error issue - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Dreamhost Database Error issue (/showthread.php?tid=12540) |
Dreamhost Database Error issue - El Forum - 10-22-2008 [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? Dreamhost Database Error issue - El Forum - 10-23-2008 [eluser]freakish777[/eluser] Bump. Is anyone else here using Dreamhost and using mySQL? Dreamhost Database Error issue - El Forum - 10-23-2008 [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. Dreamhost Database Error issue - El Forum - 10-23-2008 [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). |