0

I installed Lamp and started all services. I run following code with shell (cmder):

$ mysql

I got this error

ERROR 2003 (HY000) cant connect to mysql server on 'localhost' (10061 'Unknown error')

I have already installed wamp and this code work correctly in mysql console.

Can any one explain this error?

PKa
  • 309
  • 2
  • 7
  • 23

3 Answers3

1

You may have to go to your /bin folder and from there run

mysqld

check this out

Anil_M
  • 10,893
  • 6
  • 47
  • 74
Martin Zamora
  • 169
  • 1
  • 4
0
C:\wamp\bin\mysql\mysq15.5.24\bin>mysql

ERROR 2003 (HY000) cant connect to mysql server on 'localhost' (10061 'Unknown error')

the error message is because you haven't told mysql what user to use for logging in. You must specify the user with the -u option and then tell it to log in as "root". Here's how it looks:

C:\wamp\bin\mysql\mysql5.5\bin>mysql -u root
Welcome to the MYSQL  monitor. Commands end with ; or \g.
Your MYSQL connection id is 2
Server version: 5.5.24-log MySQL Community Server (GPL)
mysql>
Ghostman
  • 6,042
  • 9
  • 34
  • 53
0

I am running mysql on windows 8 and fixed this error by going into c:\mysql\bin and right clicking the "mysqld" file and choosing run as. Choose the first option (current user etc..) and hit ok.

Darshan
  • 2,094
  • 1
  • 15
  • 15