Ubuntu Mysql can't access from client machine

-1

I have an Ubuntu server running a Mysql Database and I'm tring to connect from a client computer.

The problem is that I can't connect because first it gives this error:

lost connection to mysql server at 'reading initial communication packet' system error 0

After this I have commented the line bind-adress = 127.0.0.1 of /etc/mysql/my.cnf and checked that the port is open with netstat -lnt

The next thing I have done is to go to /etc/hosts.allow and add mysqld:xxx.xxx.xxx.xxx:allow (the ip of the client). But when the client tries to connect the server return

Host 'xxx.xxx.xxx.xxx' is not allowed to connect to this MySQL server

I don't know what I can do.

albert

Posted 2018-02-05T11:09:06.667

Reputation: 99

Answers

0

Do you think you already have set a password for connecting from IP xxx using the MySQL user yyy? If not, please do so.

See https://dev.mysql.com/doc/refman/5.7/en/adding-users.html for how to achieve this.

vautee

Posted 2018-02-05T11:09:06.667

Reputation: 653