5

I am having window 7 as a operating system in the production machine where i am trying to use MySQL server 5.0 as a database. But i am unable to configure MySQL on my production machine. Following is the error i am receiving.

The security setting could not be applied to the database because the connection has failed with the following error:

Error no. 2003
Can't connect to MySQL server on localhost (10061).

The message also prompts that you need to open TCP 3306 port to resolve this issue, i checked it and found that TCP 3306 port is already opened and state is listening.

This is my 'netstat -an' command result -

Proto   LocalAddress   ForeignAddress   State
TCP     0.0.0.0:3306      0.0.0.0:0           LISTENING

It means TCP at 3306 is open. Can anyone please tell me the solution of this problem. However i am able to install and configure the same MySQL Server setup in window xp. I tried google as well and found a lot of blogs but none is of use.

Thanks a lot.

OMG Ponies
  • 325,700
  • 82
  • 523
  • 502
R. Rahul
  • 1,166
  • 3
  • 16
  • 40
  • As far as I'm aware, certain firewalls can cause this error. Is this something you've checked? – Jack Murdoch Jul 06 '11 at 16:09
  • Try to connect with telnet: `telnet localhost 3306`. If it fails, then probably firewall is blocking connections. – galymzhan May 16 '12 at 04:23
  • @kuri, Do you still have this problem? I have a similar problem after installation in Windows 7. I never tried MySQL on Windows XP. If you solved it, please post the answer here, and I can vote for you, if it is the solution. Thanks. – The Original Android Jun 07 '12 at 23:08

5 Answers5

5

Change

 host: localhost

to

 host: 127.0.0.1

This is likely caused by the way your database is being resolved.

stevedbrown
  • 8,862
  • 8
  • 43
  • 58
  • 1
    where this property is set? as I am having same problem " Error no. 2003 Can't connect to MySQL server on localhost (10061)." and surprisingly only on clicking an specific table. My database is connected, properly working but when I click on a specific table system throws this exception. – Just_another_developer Aug 31 '12 at 10:46
  • It's really dependent on that application you are using too connect to the database, but somewhere, you've definitely typed the connection string. – stevedbrown Sep 29 '12 at 17:21
  • In the connection string you're using. – stevedbrown Feb 24 '14 at 02:08
0

First check in the system, MySQL services is in running condition or not. look out on path of services go to right click on My Computer > manage > Services and Application > Services and check MySQL service status is started or not. Otherwise right click on service and start to service.

I hope this will help you.

Akshay
  • 348
  • 4
  • 12
0

I didn't find the MySQL services even after solving the problem.
I just run the mysqld as administrator and the problem is solved. So, simple but It took me 3 hours to find the solution.

Anptk
  • 1,125
  • 2
  • 17
  • 28
0

The problem was rsolved. The MySQL was not running in the Services section of Settings. Because XAMMP had disconnected the already running application in the background.

Enda
  • 1
0

have you checked whether the port 3036 is already in use by another application? Have you checked whether a telnet hostname 3036 works on the local MySQL server and also on the remote machine?

QMP
  • 1
  • 1