Check /etc/my.cnf and make sure you are listening for outside connections. edit the line that starts with bind-address

change:
Code:
bind-address = 127.0.0.1
to:
Code:
#bind-address = 127.0.0.1
make sure mysql is running:
Code:
/etc/init.d/mysql status
if not, start it:
Code:
/etc/init.d/mysql start
check if the ubuntu firewall is running
Code:
sudo ufw status
if it is, allow mysql
Code:
sudo ufw allow mysql