This seems like a duplicate post, but I have checked all the solutions posted in relevant posts and none of them worked for me. So allow me to state the problem more accurately.
I have a server, where MySQL is installed. I have a user X with password P.
If I connect to the server (ssh or something) and try to run MySQL locally (mysql --user=X --password==P
) it logs in perfectly, and I have access to everything:
mysql> show grants;
...
+------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'X'@'%' IDENTIFIED BY |
|PASSWORD 'somehash' WITH GRANT OPTION |
+------------------------------------------------------+
Now if I go to the config file: (sudo vim /etc/mysql/my.cnf
) I see the following:
bind-address = 0.0.0.0
port = 3306
Then I go to hosts allow file (sudo vim /etc/hosts.allow
) I see:
mysqld: ALL
Then I go to hosts allow file (sudo vim /etc/hosts.deny
): the file is empty (except for some comments).
Still, when I try to connect with MySQL workbench I have the problem. Here is how I do it. I go to add a new connection, I add the URL, username, pass, and port, and I click test connection and I get the message that is the title of this question. I tried with a random (non-existent) user pass combination and still I get the same response.
I tried commenting out bind-address too BTW. Also the server is generally accessible for other services like PostgreSQL and such.