Report this

What is the reason for this report?

How to connect my ubuntu 16.04 vm to mysql database of another server?

Posted on March 13, 2019

VIrtual Machine Ubuntu 16.04

Details of the “another server” (Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-1065 aws ec2 server)



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.

Greetings!

I found a tutorial for this here: https://www.techrepublic.com/article/how-to-set-up-mysql-for-remote-access-on-ubuntu-server-16-04/

It basically comes down to two steps, and that guide covers them well:

  1. Bind MySQL to 0.0.0.0 instead of 127.0.0.1
  2. Create or edit MySQL user to be a remote user (ex. ‘user’@‘ipaddress’)

Jarland

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.