I am having a bit of trouble accessing my database remotely from my home pc in mysql workbench.

Set the bind address to in mysqld.cnf
GRANT ALL ON . TO ‘userName’@'localhost’;
GRANT ALL ON . TO 'userName’@’%’;
flush privileges;
sudo /etc/init.d/mysql restart

In the db my user appears with a % under host meaning they have remote access but I still get access denied for 'userName’@'localhost’ in workbench.

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.

Submit an Answer
1 answer


In WorkBench, you would need to specify the IP address of your droplet instead of localhost. Also note that as you’ve allowed remote MySQL access to your droplet, you should not use an SSH tunnel for WorkBench.

Hope that this helps!