I can not access a database through MySQl Workbench. The following message appears:
However, with PHPMYADMIN, I can. How do I get access to the MySQL Workbench?
To give the user permission to access you can run this query:
GRANT ALL PRIVILEGES ON db_name.* TO'username'@'seu_ip' IDENTIFIED BY 'password'
TRIP:
db_name by the name of your database.
username by your user in the database.
password with your password.
your_ip the ip of the machine that will access the mysql server.
After this command execute:
FLUSH PRIVILEGES;
to update the privileges on the user.
Comments:
Some hosting providers do not allow remote connection to mysql.
You can also:
Use % joker instead of your ip, but this will allow connections to mysql with that user over any network interface, and for security is not advisable.