Sentora Support Forums

Full Version: MySQL remote access...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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.
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.
(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.
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)
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.
(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
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)
(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!
Ah ha! Glad you got it sorted out Big Grin
Enjoy Sentora! (and Minecraft Wink )
(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?
Pages: 1 2