tags:

views:

622

answers:

5

Hi Everyone,

Ive install wamp server on my PC(it has no internet or intranet connection, Windows XP -OS). But when I access MYSQL this error popup. Can you give any idea on how can i resolve this error. thank you very much.

Cant connect to MYSQL server on 'localhost' (10061)

A: 

Make sure it is running, check in my.cnf that it is really listening to the correct IP ( 127.0.0.1 ) and make sure you connect to the correct port aswell.

Try using telnet for debugging aswell and see where the problem lies, maybe mysql isnt started, or listens to a different port.

Filip Ekberg
A: 

Hi, I really appreciate your answer, but how can i check if the MYSQL is not yet started or listens to a different port. Thank you very much.

A: 

To check to see if MySQL is running, provided its installed as a service you can go to Start -> Control Panel -> Administrative Tools -> Services (i may be a bit off on those paths, I'm an OS X / Linux user), and look for MySQL on that list. See if it is started or stopped.

You can then do a portscan if you really want to and determine if that port is open. There are all kinds of free tools online that will scan your IP and tell you which ports are open and what is listening on them.

A: 

Unless you did something during the install, I believe that the port will be standard and the service will NOT be running after install.

MySQL provides several GUI tools for managing servers: http://dev.mysql.com/downloads/gui-tools/5.0.html One of those tools is the "MySQL System Tray Monitor" which will detect the running service, and allow you to stop and start the server easily. You can also review the list of services for "MySQL" to see if that service is active.

If the service is running and you still can't connect, you need to make sure the Windows firewall is not blocking access to the port. If your firewall is not configured to notify you when it block a program (check the Windows Firewall control panel, it might not have notified you that it's detected the program).

acrosman
+2  A: 

from the commandline (start/run/ type cmd, press ok), type:

telnet localhost 3306

If MySQL is running, you'll see the mysql version (and some garbage).

To see if the service is running, type:

sc query mysql

You'll see something like this if it's running:

SERVICE_NAME: mysql
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE,PAUSABLE,ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0
Wouter van Nifterick