MYSQL database how to check if database is active and on which port (Linux)?
It seems that your mysql connection is only listening by unix sockets and now by the actual TCP. 

To solve that, go to your configuration file, usually on /etc/mysql/ folder with the name my.cnf on Ubuntu(if you are using some other system should be similar). 

In the configuration file you should have a section called [client].

make your server to listen on 127.0.0.1:3306 by: 

[client]
port        = 3306
#socket     = /var/run/mysqld/mysqld.sock
host = 127.0.0.1


And than restart the server.

Now you should have access to the mysql shell by doing on your command line.

mysql -U TEST -h 127.0.0.1 -p db_name


Or you can use any other client you want.