Link to home
Start Free TrialLog in
Avatar of ilteris
ilteris

asked on

Why I can not connect to MYSQL Server on my local machine when my network adapters are not connected to a network.?

Hi
I am developing a web site by php. Apache2.2 and Mysql Server 5.1 and PHP5 are installed on my computer. For a week i went on with my development without any problem, it was so easy to test my pages from localhost, i was having no problem to manage the database by phpmyadmin. But today i noticed that i'm not able to connect to MySql server when my network adapters are not connected to a network. When any of my network adapters are connected to any network with a valid ip address, i can connect to MYSQL via console, phpmyadmin or mysql_connect() function in php. But when i unplug my ethernet cable and disable my wireless network adapter, i get the following error. I've done exactly the same Php apache mysql installations on to my Desktop computer and Notebook computer. This problem does not occur on my desktop but occurs on my notebook. The only difference between these two are, Win XP Pro Sp3 is installed on my desktop, Win XP Home Sp3 is installed on my notebook.

Does any one have an idea about it?
Error 2003 (HY000), Can't connect to Mysql Server on 'localhost' (10022)

Open in new window

Avatar of shobinsun
shobinsun
Flag of India image

Hi,

Your mysql sever is not running now .Please do manualy.
Have you changed the location for mysql data files? (with a datadir=C:\<some path>
command in your my.ini file)

mysql.host is a table created in your database for MySQL's own use.
If it can't find it, either you've specified a new data file path and
not moved the files to the new location, or there was some kind of problem
during installation and the data files weren't created.
ASKER CERTIFIED SOLUTION
Avatar of shobinsun
shobinsun
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ilteris
ilteris

ASKER

Seems like you are right with the firewall thingy. I checked task manager and verified that mysqld.exe is running. My internet security software (Bullguard 8.5) seems to block mysql connection somehow. My firewall does not block when my computer is connected to a network, but when all my network adapters are disabled (when i was on a bus), i guess my firewall is blocking all connection attempts including localhost.