Bug #3014 Error 2003 - can't connect to MYSQL server on localhost <10061>
Submitted: 29 Feb 2004 10:36 Modified: 15 Sep 2016 14:37
Reporter: Mitchell Gobrick Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:4.0.16-max-debug OS:Windows (WINDOWS 2000 Pro)
Assigned to: CPU Architecture:Any

[29 Feb 2004 10:36] Mitchell Gobrick
Description:
Juging from the 'expert' websites this is a very big problem for it keeps popping up over and over again. Appearantly, Windows is blocking access so the MYSQL server doesn't connect to localhost or connect at all. This so called 'expert' advice I have been getting has been way off base cause they keep dishing out the same old advice which doesn't work. Fortunatly this MYSQL version has the debuging feature with it so I can present the precise problem to you.

040226 18:19:18  InnoDB: Operating system error number 5 in a file operation.
InnoDB: See http://www.innodb.com/ibman.html for installation help.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory. It may also be you have created a subdirectory
InnoDB: of the same name as a data file.
InnoDB: File name .\ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.

See What I mean? The InnoDB people would like us to pay an obnoxious sum to fix it.  It's not going to happen.

How to repeat:
Error 2003 - Can't connect to MYSQL server on 'localhost' <10061>

Error log message below:

040226 18:19:18  InnoDB: Operating system error number 5 in a file operation.
InnoDB: See http://www.innodb.com/ibman.html for installation help.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory. It may also be you have created a subdirectory
InnoDB: of the same name as a data file.
InnoDB: File name .\ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.

Suggested fix:
Bypass Bill Gates attempts to block access to whatever directory he is blocking access to. Find a way into whatever directory WINDOWS is keeping the InnoDB from accessing.  The InnoDB people seems to know something about this. They are trying to collect obnoxious sums for the previledge of having whatever roadblock removed from whatever directory Microsoft is blocking access to. I would definitely advise you to investigate and to look into the matter.  It's a rather widespread problem and the 'expert' advice that people have been seeking has proven to be way off the mark as the enclosed bug report seems to indicate.
[6 Mar 2004 13:53] Dean Ellis
There is not enough information provided in order to identify the cause.  As it sounds like a configuration issue, you should detail where you have installed MySQL and provide your my.ini.
[21 Jun 2004 9:10] Sergei Golubchik
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
[26 Oct 2005 6:52] NILANJANA CHOUDHURY
Hi,

I have installed the MySQL server 5.0 in Windows XP Professional with the essential installer. While configuring MySQL Server Instance with the MySQL Server Instance Configuration Wizard, I am repeatedly getting "The security settings could not be applied. Error Number 2003. Can't connect to MYSQL server on 'localhost' (10061)". I have the McAfee Personal Firewall Plus running in my machine and opened the port 3306 for MySQL. I tried repeatedly by removing the Server Instance and then reconfiguring, but everytime I am getting the same error. Please help.
[26 Oct 2005 6:55] NILANJANA CHOUDHURY
Here is my .err file.

InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
051023 23:32:09  InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
051023 23:32:10  InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 10 MB
InnoDB: Database physically writes the file full: wait...
051023 23:32:10  InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
051023 23:32:12  InnoDB: Started; log sequence number 0 0
051023 23:32:14 [ERROR] Aborting

051023 23:32:14  InnoDB: Starting shutdown...
051023 23:32:16  InnoDB: Shutdown completed; log sequence number 0 43655
051023 23:32:16 [Note] C:\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown complete

051024 21:03:23  InnoDB: Started; log sequence number 0 43655
051024 21:03:24 [ERROR] Aborting

051024 21:03:24  InnoDB: Starting shutdown...
051024 21:03:28  InnoDB: Shutdown completed; log sequence number 0 43655
051024 21:03:28 [Note] C:\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown complete

051025 20:54:17  InnoDB: Started; log sequence number 0 43655
051025 20:54:17 [ERROR] Aborting

051025 20:54:17  InnoDB: Starting shutdown...
051025 20:54:26  InnoDB: Shutdown completed; log sequence number 0 43655
051025 20:54:26 [Note] C:\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown complete

051025 23:31:34  InnoDB: Started; log sequence number 0 43655
051025 23:31:34 [ERROR] Aborting

051025 23:31:34  InnoDB: Starting shutdown...
051025 23:31:36  InnoDB: Shutdown completed; log sequence number 0 43655
051025 23:31:36 [Note] C:\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown complete

051025 23:33:28  InnoDB: Started; log sequence number 0 43655
051025 23:33:28 [ERROR] Aborting

051025 23:33:28  InnoDB: Starting shutdown...
051025 23:33:30  InnoDB: Shutdown completed; log sequence number 0 43655
051025 23:33:30 [Note] C:\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown complete
[4 Jun 2006 22:51] Brian Kueck
If you're like me, your running ASP & PHP to a MySQL database, on top of IIS... from a Windows 2000 server. PHP will connect to MySQL, but ASP won't. It's an issue with the firewall and you have to manually change a firewall setting. I use ZoneAlarm Pro. So here is how to change it 1st for non-Zone Alarm firewalls and 2nd for Zone Alarm firewalls.

Non-Zone Alarm firewalls:
Check your options for the "COM Surrogate" setting. Give it some kind of "trusted access" rights. It's the c:\%winroot%\system32\dllhost.exe file.

Zone Alarm Pro firewall:
Look in Program Control (left side), then the Programs tab (top middle). Find "COM Surrogate". The "Access:Trusted" setting is the one that will block IIS' attempt to connect to MYSQL. Enable it and you can get around the "can't connect to MYSQL server on localhost <10061>" problem. Simply switch the settings as follows. 

COM Surrogate - SmartDefense - Custom
COM Surrogate - Trust Level - ASK (blue "?" mark)
COM Surrogate - Access:Trusted - ALLOW (green check mark)
COM Surrogate - Access:Internet - ASK (blue "?" mark)
COM Surrogate - Server:Trusted - ASK (blue "?" mark)
COM Surrogate - Server:Internet - ASK (blue "?" mark)
COM Surrogate - Send Mail - ASK (blue "?" mark)

Key: 
The Zone Alarm firewall has these 3 options for each ALLOW/BLOCK/ASK option:
ALLOW = (green check mark)
BLOCK = (red letter "X")
ASK = (blue "?" mark)

Notes: For our purposes, the only setting that matters is the one with the "ALLOW (green check mark)" setting for "Access:Trusted". You can probably do whatever you want with the other settings. 

Here is what the categories mean: 
"Access:Trusted" will only let the dllhost.exe file use the rest of your computer. It won't access the Internet like the "Access:Internet" setting would. It won't run as a local server, that only your PC can use, like "Server:Trusted" would. It won't run as an Internet server, that everyone else in the world can use, like "Server:Internet" would. So you're safe with switching the setting above to the "ALLOW" option.

Enjoy!
[6 Aug 2007 18:52] suchi pandya
I have installed the MySQL server 5.0 in Windows XP Professional with the essential installer. While configuring MySQL Server Instance with the MySQL Server Instance Configuration Wizard, I am repeatedly getting "The security settings could not be applied.Error Number 2003. Can't connect to MYSQL server on 'localhost' (10061)". I have the McAfee Personal Firewall Plus running in my machine and opened the port 3306 for MySQL. I tried repeatedly by removing the Server Instance and then reconfiguring, but everytime I am getting the same error. Please help...urgently required for my project :(
[14 Oct 2008 9:11] Pieter Lambrecht
Hi,

I had the same error 5...
this was after a restore of the ibdata1.
after playing wit access rights, folder names etc, I found that the 'read-only'flag was set (Windows machine) on the ibdata and the logfiles..
Disabling read-only solved my problem

greetz
[26 Nov 2008 4:33] mahesh kedari
Hi,
When you remove the instance, make sure that, at the same time you remove Mysql client (e.g. MysqlYog) from your system. Then try again to configure the server.

This problem occurs because client blocks the port.
[25 Apr 2009 1:50] Matt Koola
I was having the same problem. I tinkered around after finding no help from forums.

Go to <c>:\<mysql_install_dir>\bin 
and make sure you have mysql.exe running.

I also read something about installing Mysql as a windows service, but this solution seems a lot less troubling and it fixed my problems.
[25 Jun 2012 11:09] nikil reddy
1. Signout skype and
2. Start wamp server and now try it should be ok......
[2 May 2013 23:55] MySQL Verification Team
Could you please try with new release version 5.5 at least. Thanks.
[3 Jun 2013 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[11 Dec 2015 6:53] Nick Parsons
I am running into the same problem.  I have Windows 7 Home Premium.
[15 Sep 2016 14:37] MySQL Verification Team
I couldn't repeat with new server version 5.5/5.6/5.7.