This sounds really easy to fix but I ve been working on it for awhile.
Database Error: Unable to connect to the database:Could not connect to MySQL
I had to make a local copy of Joomla for backup and changes so I didn t mess up the live site.
I grabbed all the files off the live site via FTP. Did a DB dump. Put the DB on my local machine, copied the Joomla files to a subfolder of my server root. Changed config variables to fit the current setup of PHP, Mysql, Apache.
Now I put in a test.php which connected and queried the DB fine.
$db = mysql_connect("localhost","root","sunshine") or die ( Unable to connect to Database! );
mysql_select_db("iweb");
$query = "SELECT * FROM jos_content LIMIT 0 , 30";
$results = mysql_query($query);
while($row = mysql_fetch_assoc($results)){
echo <br> .$row[ title ];
}
however when I put the same DB credentials into the configuration.php it gives the the aforementioned error.
I have been looking at the .htaccess and haven t found anything.
Anyone have an idea of what is going on here?
Joomla 1.5.4, Apache 2.2.X PHP 5.2.X on a Windows XP Professional Box.