When I use Navicate to connect to mysql on Ubuntu, I got message 2003(10061) firstly.
To resovle this error, I midified one line of file my.cnf. Use command below:
sudo vi /etc/mysql/my.cnf
Then commented out line says "bind-address = 127.0.0.1".
After that I restart mysql. But got another message 1130.
It's the problem of host. Then I logon mysql. Issued command below.
mysql -u root -p
mysql>use mysql;
mysql>select 'host' from user where user='root';
mysql>update user set host = '%' where user ='root';
mysql>flush privileges;
mysql>select 'host' from user where user='root';