#2003 - Can't connect to MySQL server on 'localhost' (10057)
Posted by: WoAnerges (80.243.154.---)
Date: April 17, 2008 01:47PM

#2003 - Can't connect to MySQL server on 'localhost' (10057)

what have i do now?
ive installed wamp server but it not starting and not starting mysql
Please tell me what must i do??????????

Options: ReplyQuote
Re: #2003 - Can't connect to MySQL server on 'localhost' (10057)
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: April 17, 2008 01:54PM

#2003 - Can't connect to MySQL server on 'localhost' (xxxxx)

Check what colour your wamp icon is... yellow+white or all white?

If it is yellow+white move further down this post

----------------------------------------------------------------------------------------------
WHITE WAMP ICON
----------------------------------------------------------------------------------------------
If your wamp icon is white then mysql service is running but phpmyadmin cannot connect because its paramaters are inncorrect.

first find out what port your mysql is running on....

goto C:\wamp\bin\mysql\mysql5.0.51a and open the configuration file 'my' or 'my.ini'
it is written 3 times in this file

----------------
[client]

port=3306
----------------
# The TCP/IP Port the MySQL Server will listen on
port=3306
----------------
[mysqld]
port=3306
----------------


3306 is the standard port for mysql. if yours is different keep a note of it and

goto C:\wamp\apps\phpmyadmin2.11.5\ and open 'config.inc' or 'config.inc.php'

find the line

$cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank for default port

and fill in your port number bewteen the ''
if your port number is 3306 then leave this blank as mysql knows this by default


also check

$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address

and make sure your hostname is localhost as above.



-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------





YELLOW + WHITE WAMP ICON
-----------------------------------------------------------------------------------------------

If your wamp icon is yellow then this means that mysql service is not running.
There are a number of reasons it may not be running.

First thing to do is to try start it.

LEFT click the wamp icon, goto MYSQL, goto Service , and click Start/Resume Service.

The wamp icon will go white, and stay white if Mysql starts or it will go yellow again if the problem persists.




Next open your mysql log found at c:/wamp/logs/mysql.txt

Scroll to the bottom of the log and the last lines will hopefully contain the problem mysql is having,


The 3 most common errors are listed below

-------------------------------------------------------------------------------------
The most common is this

080410 11:37:58 [ERROR] Do you already have another mysqld server running on port: 3306 ?
080410 11:37:58 [ERROR] Aborting

This tells you that mysql is tryng to start on port 3306 but cant.
Again there are many reasons as to why this is.

1. The service mysql is blocked by a firewall
2. Port 3306 is being blocked by a firewall
3. Another program is using port 3306
4. Another copy of mysql is installed on the computer and is causing conflict.


If Windows firewall is enabled - disabled it or allow an exception for mysql on port 3306

goto CONTROL PANEL -WINDOWS FIREWALL - select OFF to disabled it

- or click the EXCEPTIONS tab at the top - Click ADD PROGRAM, browse to C:\wamp\bin\mysql\mysql5.0.51a\bin and select 'mysqld-nt' ,click open and then click ok

- Click ADD PORT,type 'mysqld-nt' into name and '3306' into port , leave TCP selected and press ok
then try restart wamp.

If you have your own firewall installed follow their instructions to replicate the results above.


Another program may be using port 3306.
To find out click start,click run, and type in 'cmd', a black console box will open.

Type in 'netstat -a' and press enter.

A list of ports being used will be displayed. Check the second column(local address) for the number 3306

If its there then another program is using the port.

You have two options-- find the program and end it or delete it if you dont use it.
- or change the port that mysql is using.

netstat may give you details on the row containing 3306 as to the program that is using it.

If not then start to end programs and process on your pc one by one and check netstat each time to see if it goes. Then you will know what program is using it.



To change the port that mysql is running on-

goto C:\wamp\bin\mysql\mysql5.0.51a and open the configuration file 'my' or 'my.ini'

The port number is written 3 times in this file

----------------
[client]

port=3306
----------------
# The TCP/IP Port the MySQL Server will listen on
port=3306
-------------------------------------------------
[mysqld]
port=3306
------------------------------------------------

3306 is the standard port for mysql. change all 3 instances of 3306 to 3307, save the file and restart wamp.

check netstat again to see if your new port 3307 shows up as listening and your wamp icon should now go white when you restart wamp.


If you have another server installed such as microsoft iis or xampp then either change your mysql port as shown above or disable or delete these servers if not used.

---------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------








This error in the log is also very common


080414 15:24:08 [ERROR] Default storage engine (InnoDcool smiley is not available
080414 15:24:08 [ERROR] Aborting


This tells us that mysql is trying to start with InnoDB as the storage engine type and its not possible

goto C:\wamp\bin\mysql\mysql5.0.51a and open the configuration file 'my' or 'my.ini'



find these lines

# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB

and change it to

# The default storage engine that will be used when create new tables when
default-storage-engine=MyISAM


Save the file and try and restart wamp

-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------






One other error you may recieve in the log is

080415 16:03:29 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist


This means that mysql cannot find the table it uses to store usernames. it may be corrupt or deleted.

goto C:\wamp\bin\mysql\mysql5.0.51a\data\mysql and make sure you have these three files user.frm user.MYI AND user.MYD

If they are missing you can download from my server at

>>www.pampserver.com/mysqlusertable - download and replace all 3

and if they are there then they are corrupt so download them anyway - download and replace all 3

restart wamp and your icon should go white.
-------------------------------------------------------------------------------



Edited 7 time(s). Last edit at 04/17/2008 02:24PM by stevenmartin99.

Options: ReplyQuote
#2003 - Can't connect to MySQL server on 'localhost' (10061)
Posted by: abex23 (---.wmin.ac.uk)
Date: April 17, 2008 09:30PM

hey,
i have being having difficulties connecting to phpMyAdmin since yesterday and i am curious to know how to solve that error thanks

Options: ReplyQuote
Re: #2003 - Can't connect to MySQL server on 'localhost' (10057)
Posted by: stevenmartin99 (193.120.116.---)
Date: April 17, 2008 09:58PM

just follow my instructions above

Options: ReplyQuote
Re: #2003 - Can't connect to MySQL server on 'localhost' (10061)
Posted by: kostantinos19 (---.on4.ontelecoms.gr)
Date: April 18, 2008 10:10PM

i take a message #2003 - Can't connect to MySQL server on 'localhost' (10061)

Options: ReplyQuote
Re: #2003 - Can't connect to MySQL server on 'localhost' (10057)
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: April 18, 2008 10:16PM

follow the steps above that i posted.. if u have any problems fell free to ask

Options: ReplyQuote
Re: #2003 - Can't connect to MySQL server on 'localhost' (10057)
Posted by: gsundar (63.84.81.---)
Date: May 21, 2008 06:46PM

I have been using WAMP for quite sometime without issues. This morning, Symantec Antivirus SW was installed on my office computers. Ever since I have been having trouble starting up WAMP - especially MySQL.
I get a yellow/white icon, and tried restarting MySQL service. I also checked my firewall, tried adding ports as suggested in this thread. My MySQL log says this:

----------------------
10:06:51 [Note] wampmysqld: Normal shutdown
10:06:51 InnoDB: Starting shutdown...
10:06:52 InnoDB: Shutdown completed; log sequence number 0 3008569
10:06:52 [Note] wampmysqld: Shutdown complete
----------------------
Is this a firewall issue of Symantec? I appreciate your help.

G

Options: ReplyQuote
Re: #2003 - Can't connect to MySQL server on 'localhost' (10057)
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: May 21, 2008 09:46PM

this is a normal shout down? looks perfect.. maybe check your apache log for an error?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: #2003 - Can't connect to MySQL server on 'localhost' (10057)
Posted by: gsundar (63.84.81.---)
Date: May 21, 2008 11:02PM

I am now able to use MySQL. I am not sure what fixed it, but restarting the computer a couple of times or disabling/enabling Symantec might have done it. I still have the yellow WAMP icon. Should I be worried?

Options: ReplyQuote
Re: #2003 - Can't connect to MySQL server on 'localhost' (10057)
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: May 21, 2008 11:39PM

yes!

if mysql is running and its yellow then apache is not running!


check which is running... left click the wamp icon.


goto Apache , Apache Services, and see if you can click Start/Resume

then
goto Mysql , Mysql Services, and see if you can click Start/Resume



which ever one is greyed out IS the one running


WHich ever is the one that is clickable IS NOT running

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: #2003 - Can't connect to MySQL server on 'localhost' (10057)
Posted by: gsundar (63.84.81.---)
Date: May 21, 2008 11:42PM

Apache is running fine. MySQL is not. I have tried restarting it. Nothing happens. BUT, somehow, I AM able to use MySQL.

Options: ReplyQuote
Re: #2003 - Can't connect to MySQL server on 'localhost' (10057)
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: May 21, 2008 11:47PM

then you hve another copy of mysql installed,,,,
ul need to delete it.


its probably in c:/mysql or c:/programfiles/mysql



wamps mysql is all contatined in the c:/wamp folder

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: #2003 - Can't connect to MySQL server on 'localhost' (10057)
Posted by: gsundar (63.84.81.---)
Date: May 21, 2008 11:57PM

Thanks Steve. I am going to try it.
But on another note - do you think I HAVE to, even though everything is going fine now (except the yellow icon)?
Thanks and I appreciate your responses.

Options: ReplyQuote
Re: #2003 - Can't connect to MySQL server on 'localhost' (10057)
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: May 22, 2008 12:08AM

yes ... i dont think you should use a different versoin of mysql... things may not work .. depsending on how that mysql is set up

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: #2003 - Can't connect to MySQL server on 'localhost' (10057)
Posted by: lost2find (59.92.87.---)
Date: December 25, 2008 02:55AM

this the error i was geeing...

it was working fine last night but in the morning it doesn't...

thd: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
006B8853 mysqld.exe!???
The manual page at [dev.mysql.com] contains
information that should help you find out what is causing the crash.

Options: ReplyQuote
Re: #2003 - Can't connect to MySQL server on 'localhost' (10057)
Posted by: wongkn (---.115.in-addr.arpa)
Date: June 17, 2009 05:44PM

Hi, i have installed wamp but i get error when try to open phpmyadmin :"Can't connect to localhost". The problem is mysql service is not started because the wamp icon is half yellow half white. I tried to start it manually but still not working. I check the error in mysql.log and it shows:

090617 23:00:42 InnoDB: Error: unable to create temporary file; errno: 2
090617 23:00:42 [ERROR] Plugin 'InnoDB' init function returned error.
090617 23:00:42 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
090617 23:00:42 [ERROR] wampmysqld: unknown variable 'innodb_log_arch_dir=C:/xampp/mysql/'
090617 23:00:42 [ERROR] Aborting

090617 23:00:43 [Warning] Forcing shutdown of 1 plugins
090617 23:00:43 [Note] wampmysqld: Shutdown complete

can anyone please help, thx.

Options: ReplyQuote
Re: #2003 - Can't connect to MySQL server on 'localhost' (10057)
Posted by: yfastud (Moderator)
Date: June 17, 2009 06:13PM

Quote

090617 23:00:42 [ERROR] wampmysqld: unknown variable 'innodb_log_arch_dir=C:/xampp/mysql/'
you have to completely uninstall xampp and wamp, run regedit to remove its registries, remove wamp and xampp folders, restart pc, re-install wamp

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.