phpMyAdmin error
Posted by: matthazinski (---.nc.res.rr.com)
Date: April 19, 2008 08:41PM

I get this error when trying to connect to phpMyAdmin:
#2003 - Can't connect to MySQL server on 'localhost' (10061)

I have a red/white icon. Apache and PHP both work fine. I'm using the latest version with Windows ME.

The only internet programs are Firefox + uTorrent

Also, there is no MySQL error file!

Options: ReplyQuote
Re: phpMyAdmin error
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: April 19, 2008 08:46PM

this is not right,,, to get the error above php and apache would need to be running. but for this to be the wamp icon should be yellow and white .. not red...

restart wamp and se if it goes yellow and white

anyway ur mysql is not running. so follow these steps below


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


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 most common is this

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 the service as in step xxxxxx


this error in the log is also very common

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

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

the service mysql is blocked by a firewall
port 3306 is being blocked by a firewall
another program is using port 3306
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 using step x above.

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.


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 as 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. - please note when you try phpmyadmin now you may get a #1045 error. please goto to this section next.

Options: ReplyQuote
Re: phpMyAdmin error
Posted by: matthazinski (---.nc.res.rr.com)
Date: April 19, 2008 08:54PM

Like I said, there is NO log file and the icon is red/white. Also, the service controls are disabled under the Apache and MySQL menus. No other program is using the MySQL port.



Edited 1 time(s). Last edit at 04/19/2008 08:56PM by matthazinski.

Options: ReplyQuote
Re: phpMyAdmin error
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: April 19, 2008 08:56PM

do u have another server installed? its the only explination? maybe xampp? or microsoft iss which comes on some pro or server versions.

Options: ReplyQuote
Re: phpMyAdmin error
Posted by: matthazinski (---.nc.res.rr.com)
Date: April 19, 2008 08:58PM

No, I just have an ftpd, but it's not even running

Options: ReplyQuote
Re: phpMyAdmin error
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: April 19, 2008 09:24PM

then u have a bad install of wamp if ur apache is running but its red

Options: ReplyQuote


Sorry, only registered users may post in this forum.