Your MySQL service is bound to serve localhost only (interface binding). This is the default for security reasons. If you really need to access it directly from other hosts, there is a nice How to enable remote access to MySQL on Ubuntu which you could follow:
- as root, open your
/etc/mysql/my.cnf
or/etc/mysql/mysql.conf.d/mysqld.cnf
with your favorite editor, as on different systems it is found to be different. - look for the
[mysqld]
section, and in there for thebind-address
keyword. This usually is set to127.0.0.1
-- change that to match your "normal" IP-address - save the file, and reload the service (e.g. using
service mysql restart
)
Remember you must enable your remote users to access their database(s) from remote, by setting the appropriate GRANTs -- e.g.
GRANT ALL ON mydb.* TO remoteuser@'%' IDENTIFIED BY 'SomePASSWORD';
Note the @'%'
, which means "from any host".