Install Scriptcase on Ubuntu but cannot connect to localhost MySQL

I installed mysql on the localhost and then installed ScriptCase using the 64bit installed for Linux (my system is ubuntu) on the same localhost.

I can successfully connect to ScriptCase and login but when I try to connect to the MySQL instance installed on the same localhost within scriptcase using the database setup, I keep getting:
Connection Error

Connection refused mysql_connect(): Connection refused

I am able to connect to MySQL using the mysql command on the localhost using the root id and password. It just won’t work from within ScriptCase. I even ran:
grant all on . to ‘root’@’%’. Still won’t connect.

I didn’t have this problem when I installed scriptcase on windows 7.

Why does scriptcase refuse to connect to mysql?

I suspect it will be in the mysql configuration. Can you provide the error number, which will help to diagnose the problem.

Have you checked the mysql docs:

In a cmd shell try
mysqlshow -u root -p

Does a log in work on the localhost?

Then:

http://dev.mysql.com/doc/refman/5.6/en/can-not-connect-to-server.html

Cheers & good luck.

Is MySQL running on “localhost” or running on ip adress or server name? Look at this help: Click!

Commenting out bind-address= 127.0.0.1 from my.conf did the trick but another unusual thing is I can now connect using 127.0.0.1 but not localhost. I looked at my /etc/hosts file and there is an entry 127.0.0.1 localhost there. Shouldn’t this do the trick?

No, not in Linux/Unix/BSD.
For the MySQL client ‘localhost’ means the local machine, so it tries to connect to a Unix socket instead of making a network request via TCP/IP.
The problem could be that you’re either not using a Unix socket, or more likely, the MySQL client libraries don’t know where to find the Unix socket file.

Check your php.ini for mysql.default_socket. Not quite sure about Ubuntu but should be something like ‘/tmp/mysql.sock’.

jsb