0

I am able to connect to a remote MySQL database that is hosted on a Ubuntu VM through SSH and can add the database in MySQL Workbench at my home desktop. However, when I am travelling and using my laptop, I can still connect using SSH, however I cannot use the database in MySQL Workbench. I am having trouble figuring out a solution for this problem. Any help is appreciated.

2
  • Is your userid allowed from any IP address? Commented Oct 8, 2016 at 22:58
  • Yes, and I'm sure of this because I can login just fine using the terminal however it won't work with MySQL Workbench. Commented Oct 8, 2016 at 23:05

2 Answers 2

1

If you can't connect the DataBase using your Workbench, the workbench will give you an error. What is the error code? Is there any decription or information? MySQL's default server port is 3306, the connect user must have the privileges to connect the server from another PC.

Use use mysql; select Host,User from user; Confirm that the Host's value is '%', not 'localhost' or something else. Then check port 3306 is open on your server. Type netstat -an | grep 3306 or netstat -tln on your SSH console. Make sure you can find 3306 LISTEN Then check your workbench configuation, make sure these are all correct.

Without the error code and decription, that is all the reasons and solutions I can give you. Wish this would help you.

Sign up to request clarification or add additional context in comments.

1 Comment

I appreciate your time. I checked and the host value is in fact '%' and port 3306 on the server is listening. The error I receive is failed to connect to MySQL at xxx.xxx.xxx.xxx:3306 with 'username'. I'm pretty sure the IP address I entered for the host is correct and the username I used has '%' for the host value. Thanks for taking the time to answer my post.
0

The reason I was unable to add the database through MySQL Workbench was simply because I forgot to open the port for the connection. Simple user error.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.