Could not connect to database
Posted by: hedera (
Date: November 20, 2013 01:31AM

I've installed WampServer 2.2 on Win7 Pro 64 bit, on my Lenovo laptop. I use it for development copies of web sites, including a Joomla 1.5 site which I want to upgrade to Joomla 3. I can't get the Joomla 1.5 site to come up, even though I've followed all the procedures I wrote down which worked last time (including instructions from Joomla doc).

My Wampserver has to listen on port 8080 because IIS listens on port 80. I've made the changes in httpd.conf and the log shows apache listening on port 8080. I've copied the files over and created a new database using the name, db user and password from my old site. I try to bring up the site and get this error:

Database Error: Unable to connect to the database:Could not connect to database

All the Joomla doc says if you get this error it's an issue with these fields in configuration.php:

var $host = 'localhost';
var $user = 'the_db_username';
var $db = 'the_databasename';
var $password = 'the_db_password';
var $live_site = ''; // is usually empty.

I've double checked all of them and they exactly match the database fields. Under my old config the "localhost" entry did not have the port spec. There is a file \wamp\www\testmysql.php which I ran and it gives this error:

Could not connect to MySQL: php_network_getaddresses: getaddrinfo failed: No such host is known.

I can log into phpMyAdmin either as root or as the db-user and see and manipulate the database but I can't connect to it. What gives??

Nature bats last.

Sorry, only registered users may post in this forum.