user1888598
user1888598

Reputation: 193

Installed XAMPP but can't connect to MYSQL server in cmd

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 :)

Upvotes: 3

Views: 4890

Answers (3)

Katiuska Marín
Katiuska Marín

Reputation: 49

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

I would to know where is PATH enviroment variable

Upvotes: 1

kalibbala
kalibbala

Reputation: 508

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

Upvotes: 1

dbalex
dbalex

Reputation: 11

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

Upvotes: 1

Related Questions