Error Code 2002
Posted by: l_x_young@hotmail.com (---.dsl.emhril.sbcglobal.net)
Date: June 23, 2011 03:50AM

when my PHP application tries to connect to my MySQL database, I get the following error in the mysql.log:

110622 20:42:50 [Note] Plugin 'FEDERATED' is disabled.
110622 20:42:51 InnoDB: Started; log sequence number 0 44253
110622 20:42:52 [Note] Event Scheduler: Loaded 0 events
110622 20:42:52 [Note] wampmysqld: ready for connections.
Version: '5.1.53-community-log' socket: '' port: 3306 MySQL Community Server (GPL)


and my application prints the following message:

Error Code 2002: An attempt was made to access a socket in a way forbidden by its access permissions.

The interesting thing I noticed is that in the mysql.log, the socket is just a pair of empty quotes. Is this the problem? Should there be a valid socket number?

Options: ReplyQuote
Re: Error Code 2002
Posted by: l_x_young@hotmail.com (---.dsl.emhril.sbcglobal.net)
Date: June 23, 2011 04:55AM

Date: June 23, 2011 04:54AM

I found php.ini in the following two places:

c:\wamp\bin\apache\Apache2.2.17\bin
c:\wamp\bin\php\php5.3.4

I found my.ini in the following place:

c:\wamp\bin\mysql\mysql5.1.53

I could not find a my.conf file.

I could not find a my.cnf file.

What next should I try?

Options: ReplyQuote
Re: Error Code 2002
Posted by: l_x_young@hotmail.com (---.hsd1.il.comcast.net)
Date: June 23, 2011 06:59PM

I uninstalled wampserver, removed the wamp directory, and then reisntalled wampserver.

My php application still displays the 2002 error message.

My mysql.log file still has the following:

110623 11:57:23 [Note] Plugin 'FEDERATED' is disabled.
110623 11:57:23 InnoDB: Started; log sequence number 0 44233
110623 11:57:23 [Note] Event Scheduler: Loaded 0 events
110623 11:57:23 [Note] wampmysqld: ready for connections.
Version: '5.1.53-community-log' socket: '' port: 3306 MySQL Community Server (GPL)

Options: ReplyQuote
Re: Error Code 2002
Posted by: l_x_young@hotmail.com (---.hsd1.il.comcast.net)
Date: June 23, 2011 07:12PM

when I turned off my McAfee Firewall the problem was fixed!

so I was trying to figure out what I need to change in McAfee settings, and the answer is:

Firewall -> Settings -> Program Permissions -> Apache HTTP Server -> need to be set to Full or Outgoing

Options: ReplyQuote
Re: Error Code 2002
Posted by: yfastud (Moderator)
Date: June 23, 2011 11:27PM

To run Wamp, you need to setup full permission in firewall/antivirus for both Web server Apache and Database server MySQL

Have fun,

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

Options: ReplyQuote
Re: Error Code 2002
Posted by: ramakrishna232 (---.beamtele.net)
Date: April 15, 2012 01:44PM

THank you so much, it fixed my problem.

Options: ReplyQuote


Sorry, only registered users may post in this forum.