I am new to Ubuntu using version 14.04 64-bit. I have successfully installed xampp and all services are running correctly. However I have installed mysql workbench and then I get the error;

Unhandled exception can't connect to mysql server on '' (111) (code 2003)

I have read all over the internet that I should changed the line;

    bind-number =

to have a # in-front of it to be commented out. And I have done this. I have also changed the port number from 3306 to 5123 as I am running this ubuntu on vm-ware and have xampp also installed on my windows which is using port 3306. But this did nothing. I am getting confused as what to do seeing as the mysql server says it is running on both the command line and mysql workbench but I keep getting that error when clicking on the connection in mysql workbench.

I have looked at various similar questions such as this and this and this and many more but these don't seem to help.

Also I get a strange reply when running the command

   sudo service mysql status


  sudo service mysqld status

for both of these command respectively I get the result

  mysql: unrecognized service


 mysqld: unrecognized service

I am not sure if this has anything to do with it.

  • The port number is not an issue because each machine (be it virtual or physical) has its own IP address. Try connecting to the desired server by using its IP address - not – hmayag Feb 27 '16 at 10:35

I had the same problem. Here's how I resolved the issue:

sudo apt install mysql-server
sudo netstat -tap | grep mysql
sudo systemctl restart mysql.service

Now everything is working fine. The following guide was of great help: https://help.ubuntu.com/lts/serverguide/mysql.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.