I find it hard to establish a link between jdbc and mysql. I think one of the reasons is the mysql port. I checked the port with the statement: \"show variables like \'port\';\"
You need to change this value from mysql configuration file. Steps are:
To go to related file: sudo nano /etc/mysql/my.cnf
To search for related line:(for Win, Linux) ctrl + w
, (for Mac) cmd + w
port = 0
(look for twice for [client] and [mysqld] sections)
port = 3306
ctrl + x , cmd + x y
sudo service mysql restart