This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

MySQL remote access...
#1
MySQL remote access...
Hi there... new to Sentora and really love it. Except I'm running into issues accessing databases remotely. Currently running Sentora on Ubuntu 14.04 32bit (Digitalocean 512MB VPS).

So my situation is that I'm hosting a few websites, one is Minecraft related. We also have a Minecraft server that is hosted elsewhere, but needs remote access to the websites database to pull user data. The config for our Minecraft server is really straightforward, not really any different than your typical forum install...

Code:
 # Hostname for your MySQL Server
 hostname:
 # MySQL Port
 port: 3306
 # Database Name
 name:
 # Database Username
 username:
 # Database Password
 password:

So I have all the correct variables mirroring our db/user info from Sentora, and the user is granted remote access to the IP the Minecraft server is running on. It should work, but it's not. We get this error in our Minecraft server's console... [09:13:03 ERROR]: [CommunityBridge] Could not connect to MySQL Server:Communications link failure.

I've set the bind address to 0.0.0.0, and made sure 3306 is open in the firewall. I really don't know what else to do. Admittedly this is all rather new to me, as up until last week this set up was running off some budget shared hosting :\

Any advice/help is appreciated. Thank you.
Reply
Thanks given by:
#2
RE: MySQL remote access...
Code:
# Hostname for your MySQL Server
hostname: http://yourdomain.com (or http://serverIP)
# MySQL Port
port: 3306
# Database Name
name:
# Database Username
username:
# Database Password
password:
You also need to make sure that when you created the db user that you set it to be accessed from any IP and not just localhost.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#3
RE: MySQL remote access...
(02-25-2015, 04:16 AM)TGates Wrote:
Code:
# Hostname for your MySQL Server
hostname: http://yourdomain.com (or http://serverIP)
# MySQL Port
port: 3306
# Database Name
name:
# Database Username
username:
# Database Password
password:
You also need to make sure that when you created the db that you set it to be accessed from any IP and not just localhost.

Excuse my ignorance, but how do I do that? When I make a database in the Sentora panel it only gives me the option for a name. I thought remote access was determined via the user.
Reply
Thanks given by:
#4
RE: MySQL remote access...
Correct, typo on my part Wink Fixed original post.
you just need to make sure the user has remote access (any IP) then connect the way I suggested.
(Note: any domain that is on your server can be used as long as port 3306 is open)
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#5
RE: MySQL remote access...
Hmm, for me has necessary one more thing:
Code:
sudo vim /etc/mysql/my.cnf
Find this:
Code:
bind-address=127.0.0.1
Change for this:
Code:
bind-address=YOURSERVERIP
Change YOURSERVERIP for the your server IP. Save and quit:
Code:
:x
Restart the MySQL:
Code:
sudo service mysql restart
Remember: the port 3306 needs to be open at firewall.
Reply
Thanks given by: pixelbat
#6
RE: MySQL remote access...
(02-25-2015, 04:46 AM)TGates Wrote: Correct, typo on my part Wink Fixed original post.
you just need to make sure the user has remote access (any IP) then connect the way I suggested.
(Note: any domain that is on your server can be used as long as port 3306 is open)

Like I said in my original post, the user has been granted remote access. I've tried both by adding the actual IP, and also by selecting any IP. No dice.

I added an http:// like you suggested in the Minecraft config. It doesn't work either. I've had this set up for literally years. It's always been the database IP only in that setting. Essentially I moved my setup from shared hosting to a VPS using Sentora, and now I can't get any remote database access to work.

Bind is set to 0.0.0.0
port 3306 is open
user has remote access
config file on the Minecraft server has all the correct variables
Reply
Thanks given by:
#7
RE: MySQL remote access...
Really, can't connect. You try what I suggested?
Ah, after you do this, create a new user with the permissions of external access at the Sentora Panel.
Code:
mysql -u testuser -p obsidia_test -h 104.236.187.80
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '104.236.187.80' (111)
Reply
Thanks given by: pixelbat
#8
RE: MySQL remote access...
(02-25-2015, 05:45 AM)rafaht Wrote:
Code:
bind-address=YOURSERVERIP
Change YOURSERVERIP for the your server IP. Save and quit

This here fixed it... I read a few places that suggested setting my bind to 0.0.0.0, never thought to try my own server IP. This has been driving me crazy for a couple days. Thank you soooo much!
Reply
Thanks given by:
#9
RE: MySQL remote access...
Ah ha! Glad you got it sorted out Big Grin
Enjoy Sentora! (and Minecraft Wink )
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#10
RE: MySQL remote access...
(02-25-2015, 05:45 AM)rafaht Wrote:
Code:
bind-address=YOURSERVERIP
Change YOURSERVERIP for the your server IP. Save and quit

Are there any security or compatibility issues on changing this?
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
SSH Access rsthomas 2 5 ,896 01-06-2021, 12:14 AM
Last Post: rsthomas
MySQL Database user prefix MosleyCale 1 5 ,657 10-17-2020, 09:11 PM
Last Post: Ron-e
No access after reinstall brucecy92 1 4 ,169 10-10-2020, 01:50 PM
Last Post: Jettaman

Forum Jump:


Users browsing this thread: 1 Guest(s)