System: Win XP Pro, Apache 2.x, PHP 4.2.2
Im trying to install MySQL. I had it installed before, but for some reason after a while I couldnt connect to it. So I thought Id upgrade to the latest version (v 3.23.52). The uninstall and re-install went ok, and I was asked for a new user name and password for root access (all perfectly normal). I restarted my computer (force of habit more than anything else) and tried to connect to the server, first using PHP and then using the command prompt.
I found that I couldnt connect, unless I specified blank as the hostname. for example, when connecting using the command line: c:\mysql\bin\mysql.exe -h -u piers -p (you will notice the lack of a hostname after the -h).
I tried to connect to localhost using PHP, but i got the message: "Can't connect to host "localhost".
So I tried running this:
<?php
$user="piers";
$password="****"; // No this isnt my real password, I just didnt want to broadcast it out...
$server="";
$connect=mysql_connect($server,$user,£password);
?>
And this worked fine.
Now, I hear you ask, what is he complaining about? He can connect to his MySQL server with no problems.
The problem is that I rely quite heavily on phpMyAdmin when working with my databases, and you cant specify "" as a server; it doesnt like it, and if I type "localhost" then it wont connect.
I just wanna know if anyone has had this sort of problem before, and if they fixed it, how did they fix it?
Apologies about the length of this post, but I REALLY need to know what the heck is going on...