Link to home
Start Free TrialLog in
Avatar of yes4me
yes4me

asked on

ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)

SETUP:
WindowXP Home Edition
Almost fresh installation, only softwares installed are: IIS, Apache, Tomcat, J2SE, Perl, PHP, and two firewalls.


GOAL:
I installed before MySQL on window 2000 professional and it worked fine with PHP. This time I want to installed it on my window XP home version. However it doesn't work.


STEPS:
Here are the actual steps I did:
- go to mysql.com
- download the zip file for Windows 95/98/NT/2000/XP/2003  4.0.15
http://www.mysql.com/downloads/download.php?file=Downloads%2FMySQL-4.0%2Fmysql-4.0.15-win.zip&mirror=http%3A%2F%2Fmysql.zawodny.com%2F
- Unzip and run the setup.exe
- Press next all the time ==> typical setup, root in C:\mysql
- Go to DOS and try to run mysql: C:\mysql\bin\mysql.exe. I get:
ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)


- Go to service and go to MySQL property. The configuration is:
      - Start: Automatic
      - Local system account
- try to start MySql service but I get:
Error 1067: The process terminated unexpectedly

- Go to laptop.err and got the following mesg:

InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to section 3.1 of
InnoDB: http://www.innodb.com/ibman.html
030912 2:19:10 Can't init databases
030912 2:19:10 Aborting

030912 2:19:10 InnoDB: Warning: shutting down a not properly started
InnoDB: or created database!
030912 2:19:10 MySql: Shutdown Complete

- uninstalled MySQL, and reinstalled it,
- Turn off all firewalls including the Windows XP firewalls.
- Turn off all servers IIS, apache, and tomcat


==> Got the same errors, however the err file is gone. HOWEVER I can't find any err file in the directory C:\mysql.


- Check the event log>System and the last one say:

The MySql service terminated unexpectedly.  It has done this 14 time(s).
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

- Run mysqld-max.exe
- Run mysql.exe ==> Same error message as before!
- Run winmysqladmin.exe, and check the config file:

#This File was made using the WinMySQLAdmin 1.4 Tool
#9/12/2003 2:00:57 AM

#Uncomment or Add only the keys that you know how works.
#Read the MySQL Manual for instructions

[mysqld]
basedir=C:\mysql
path=C:\mysql

#bind-address=192.168.1.102
datadir=C:\mysql\data
#language=C:/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-nt.exe
user=thomas
password=*****


PS: I hide the password for security reason.


I am running out of idea. Help!!
ASKER CERTIFIED SOLUTION
Avatar of Squeebee
Squeebee
Flag of Canada 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 yes4me
yes4me

ASKER

I have no idea what happen nor what did I do, but now it works.
Thanks anyhow.
Glad to at least contribute.

Mike Hillyer
www.vbmysql.com
hello,

  I got around this by right clicking on c:\mysql\bin\mysqld.exe and using "Run As..." with my admin username and password to execute.

  After execution of mysqld.exe it may seems as if nothing happened. However, try going back to your cmd.exe prompt and executing
c:\mysql\mysql.exe.

  It should work from there.

  I am using WindowsXpPro

embalism
Hello All,

I am new to MySQL, I am also getting the same error

"Can't connect to MySQL server on 'localhost' (10061)".

can anyone help me pls.

Thanks
Ari

I found one solution, double-click on the WinMysqlAdmin icon in your bin folder, make sure the service is turned on and it shows the green light.  Also, look under C:\Windows and make sure your my.ini file is there.  If its there, try deleting it before you double-click your WinMysqlAdmin icon in the bin folder and let the Admin utility create the 'my.ini' file for you. I'm using SQLServer 4.0.23.  Good Luck!!!

-JP
Avatar of yes4me

ASKER

Thanks and happy new year.
I was getting the same error, and I found that I had to turn off the Windows firewall and do an un-install/re-install combination.  Hopefully this helps someone.
You don't need to turn off your firewall. Just open the port for MySQL (default 3306). Be sure that, if you are planning to use InnoDB, you must use mysqld-max and for XP Pro, mysqld-max-nt. You MUST specify this on the .ini. I recommend using the Administrator, the last Mysql to date, and Php 5. And before I forget, just in case, activate "use old passwords under the security window from the startup variables issues. Just in case you are using ADODB or something like that. Make the respective changes on the php configuration too.
from the error i can see the following

"The error (2003) Can't connect to MySQL server on 'server' (10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, and that the network port you specified is the one configured on the server."

http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html
have a look there maby something there can help you
I was having the same problem: "Can't connect to MySQL server on 'localhost' (10061)" so the way I resolved it was:

1. Go to your Services panel in (Start > Run > services.msc) and look for MySQL. Make sure the services has been started.

2. If you have a firewall, allow for MySQL services full access and also let the firewall accept port 3306.