External connections in mysql wich is running in ubuntu.

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
k1^
New to forums
New to forums
Posts: 2
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sun Sep 10, 2017 3:09 pm

External connections in mysql wich is running in ubuntu.

Post by k1^ »

I have rented unmanaged vds wich is running on ubuntu.

How i allow external connections in mysql db?

I havent changed any default configs... just did use this quide viewtopic.php?f=46&t=11140

Do i need to use vds ip or just localhost for external connections? and is port default 3306?

Thanx for any help... :roll:
User avatar
Spray
Former staff
Former staff
Posts: 630
Joined: Wed Dec 28, 2011 10:41 pm
Location: Oregon

Re: External connections in mysql wich is running in ubuntu.

Post by Spray »

If you've followed that guide, then you'll need to take only a few additional steps to allow a remote MySQL connection.

First, you'll need to edit the MySQL config file, using:

Code: Select all

sudo nano /etc/mysql/my.cnf
Arrow down to the following line:

Code: Select all

bind-address = 127.0.0.1
Replace 127.0.0.1 with 0.0.0.0.

Now, restart MySQL:

Code: Select all

sudo service mysql restart
You'll then need to create a new MySQL user with remote access permissions, as the default setup will not allow the root user to login remotely. You can create a new user via the "Users" tab of phpMyAdmin. You'll want to ensure the "Host:" field has "Any host" selected, to allow the user to login remotely.
k1^
New to forums
New to forums
Posts: 2
Joined: Sun Sep 10, 2017 3:09 pm

Re: External connections in mysql wich is running in ubuntu.

Post by k1^ »

Thank you Spray :)
Post Reply