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

浪尽此生 提交于 2019-12-09 17:03:09

问题


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)


回答1:


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



回答2:


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.




回答3:


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.




回答4:


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).




回答5:


try to change a mysql port 3300 to "3306"



来源:https://stackoverflow.com/questions/385292/mysql-cant-connect-to-mysql-server-on-localhost-10061

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!