3

First, MYSQL services is running in XAMPP and, YES, I changed the port since it conflicts with other applications Now, the question is why can't i connect to MYSQL?

Error 2003: Cant connect to MYSQL server on 'localhost'

I also dont have any mysql services installed.

Please help. Thank you for those people who would answer me :)

2
  • Try adding PATH variables. Commented Jan 30, 2015 at 5:36
  • yes server is working and its just a localhost Commented Jan 30, 2015 at 7:03

3 Answers 3

1

First,make sure mysqld is running.

ps -ef |grep mysql

Second,get the socket file in the output of last command:

for example:--socket=/opt/lampp/var/mysql/mysql.sock

Then,try to connect to mysql:

mysql -uroot -p -P<port> -hlocalhost -S /opt/lampp/var/mysql/mysql.sock
Sign up to request clarification or add additional context in comments.

Comments

1

option 1.

  1. Goto /bin/
  2. Run mysqld (service)
  3. close the cmd prompt
  4. Run mysql.exe (make sure you add the location path to PATH environment Variable)

Option 2. try to follow this thread and see if it can help!! http://forums.devshed.com/mysql-help-4/error-2003-cant-connect-mysql-server-localhost-10061-a-26423.html

Comments

1

Run mysql.exe (make sure you add the location path to PATH environment Variable)

I would to know where is PATH enviroment variable

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.