Report this

What is the reason for this report?

How to connect remote access on MySQL Server via MySQL Workbench?

Posted on October 24, 2019

Hi folks. I’m with problems to connect remote access in MySQL server using my MySQL Workbench. I’m using Ubuntu 14.04. When I try to connect receive this message: "Host xxx is not allowed to connect to this MySQL Server’, but I made the configurations in the mysqld.cnf where I changed bind-address from 127.0.0.1 to 0.0.0.0.

I need connect in this to follow with my projects.

Any suggests?

Thanks…

Miguel



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

You need to make sure that the user that you are using is allowed to connect to the database in question from your IP address. You could check that by accessing MySQL and running:

SELECT user,host FROM mysql.user;

You should see something like this:

+------------------+-----------+
| user             | host      |
+------------------+-----------+
| youruser         | localhost |
| mysql.session    | localhost |
| mysql.sys        | localhost |
| root             | localhost |
+------------------+-----------+

If you do not have your IP in the host section or a % sign then this means that your user can not access MySQL remotely. You could grant privileges for the user in question to for a sepcific host with the following command:

GRANT ALL ON YOUR_DB.* to YOUR_USER@'YOUR_IP' IDENTIFIED BY 'YOUR_PASS';

FLUSH PRIVILEGES;

Or if you would like to allow the user to access the DB in question from any remote IP, you could change the YOUR_IP with a % sign.

Let me know how it goes! Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.