NFO VDS will not connect to external MYSQL database, Home se

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
dragula
A semi-regular
A semi-regular
Posts: 20
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Mon Jan 28, 2013 1:11 pm

NFO VDS will not connect to external MYSQL database, Home se

Post by dragula »

So I have a server ran from my house that uses many plugins (TF2 Sourcemod) that use a MYSQL database. I have had that up and running for months now with no issues. I started renting a VDS from NFO 5 weeks ago and can not for the life of me get it to connect to the same database. I have even made a new database with a different username and password and put that info in the databases.cfg and it still will not connect. Yes, I ahve allowed my gameservers ip address through remote mysql and I have gave the user all privileges. I have email supprt@nfo so many times they are probably sick of me by now. I have even emailed Bluehost (my webserver provider) Bluehost made a mysql script that runs checks 4 times an hour for incoming connections on port 3306 and writes it to a .log file. In the log file is only my home server ip address and nothing else. EWvery single plugin I try to set up on my nfoserver VDS that uses mysql fails with the same error message:

L 01/24/2013 - 15:52:24: [AutoBirds.smx] Failed to connect! Error: [2003]:
> Can't connect to MySQL server on '6*.14*.244.9*' (110)
> Failed to connect: [2003]: Can't connect to MySQL server on '6*.14*.244.9*'
> (110)
> L 01/24/2013 - 15:52:24: [SM] Plugin encountered error 25: Call was aborted
> L 01/24/2013 - 15:52:24: [SM] Native "SetFailState" reported: SQL Error:
> [2003]: Can't connect to MySQL server on '6*.14*.244.9*' (110)

I starred out some digits in the ip address. The main plugin I would like to work is TF2 Stats. On the installation help page for that plugin it says this:

"11. The final step we have to do is allowing the gameserver to access the webserver.
You have to do this via Cpanel where you were before. Somewhere you will have
Remote MySQL section or Access Hosts section where you can tell the webserver
which hosts on the internet may access the database remotely. Of course this
has to be the IP address of the gamserver. Very important note: If you are
renting a server at gameservers.com please note that de IP address for outbound
traffic is NOT the same as the IP address you use for FTP or connecting to the
server when you are going to play. You have to request the outbound IP address
by making a support ticket and asking them what the outbound IP address is!!
"

The underlined text is my concern. I know it is talking about a competitor of NFOservers but the thing that gets me is when my ip address at home changes (not static) i get the same error code kicked back to me until I go and allow my new ip address access with remote MYSQL. If someone could please please help me out on this situation I would be greatly greatly appreciated! I have spent so much time on this and am out of options. I have 3 servers so far and want to get more but if I can not get MYSQL to work to manage admins, bans, stats, and more I will not be able to continue with NFOservers. Thanks for reading this giant wall of text!
-Dragula
User avatar
Edge100x
Founder
Founder
Posts: 13156
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: NFO VDS will not connect to external MYSQL database, Hom

Post by Edge100x »

It's not that the outgoing IP changes, it's that most MySQL plugins ignore the direction to bind to a specific one, and therefore the OS chooses an IP randomly from the list. It's something that the plugins could easily fix, but for some reason, they never have. (This isn't an issue specific to any one provider and I'm not sure why your plugin author mentioned a specific company.)

In any case, try allowing everything from %.nfoservers.com. That would be the quickest way to test if it's a plugin-binding problem like this. If that works, you can use the traffic dump to look for the IP it ends up using -- but, it would still be best to allow from everything at your location, in case it changes again.
dragula
A semi-regular
A semi-regular
Posts: 20
Joined: Mon Jan 28, 2013 1:11 pm

Re: NFO VDS will not connect to external MYSQL database, Hom

Post by dragula »

Remote Mysql is not allowing me to put in %.nfoservers.com for the access list.
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: NFO VDS will not connect to external MYSQL database, Hom

Post by soja »

For clarification, where is the database hosted?
Not a NFO employee
dragula
A semi-regular
A semi-regular
Posts: 20
Joined: Mon Jan 28, 2013 1:11 pm

Re: NFO VDS will not connect to external MYSQL database, Hom

Post by dragula »

The database is hosted through Bluehost. It allows my remote home ip address access with several different plugins I have and several databases. Is NFO not allowing port 3306? Is there a firewall or something? Im sorry for the newbie questions, I am rather new to this but felt very confident after successfully setting all of this up from my home gameserver. I never could have imagined the troubles I would run into with a VPS.
User avatar
Edge100x
Founder
Founder
Posts: 13156
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: NFO VDS will not connect to external MYSQL database, Hom

Post by Edge100x »

"Can't connect to MySQL server on '6*.14*.244.9*"
That looks a lot like one of our IPs and not an external IP. Are you sure that this is the IP of the remote MySQL server, and that you didn't accidentally enter the game server's IP there?
dragula
A semi-regular
A semi-regular
Posts: 20
Joined: Mon Jan 28, 2013 1:11 pm

Re: NFO VDS will not connect to external MYSQL database, Hom

Post by dragula »

Lol, that would of been funny. Sadly no. 66.147.244.94 that is my webserver ip address box794.bluehost.com It is the same IP address I have entered into my home server databases.cfg file.
.=QUACK=.Major.Pain
This is my homepage
This is my homepage
Posts: 1573
Joined: Sun Jun 26, 2011 8:03 am

Re: NFO VDS will not connect to external MYSQL database, Hom

Post by .=QUACK=.Major.Pain »

We seen issues with L4D2 servers also using stats plugins to external databases.
In the end we had to get our webhost to open ports completely to also data transfer.

BF3 stats pages also require ports to be opened in the same situation.

We used hosts like Hostgator and Justhost and had the same issues with both.

The guys here can provide you with specific ports that your game would require opened.
Then check with your host to see if they are restricted.

Guessing for TF2, some ports might be 27015 and 27106. Maybe others, but dependant on how your server is setup. Your ports should be declared in your command line.
Visit gspreviews.com And Rate & Review Your Old & Current GSP's
Find Your GSP Coupons at gspreviews.com/coupons/
User avatar
Edge100x
Founder
Founder
Posts: 13156
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: NFO VDS will not connect to external MYSQL database, Hom

Post by Edge100x »

Continuing on the assumption that the IP it is using is not correct, try having your webhost open it up to all IPs temporarily.
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: NFO VDS will not connect to external MYSQL database, Hom

Post by soja »

Are you sure the mysql server is on the same box as the web host? Does cPanel give you a different mysql IP address in the left pane of the main page? I can't remember if it will show this, perhaps check phpmyadmin and see if it says localhost, and check the domain you are on when using phpmyadmin. I think I had this experience with a different web host.
Not a NFO employee
dragula
A semi-regular
A semi-regular
Posts: 20
Joined: Mon Jan 28, 2013 1:11 pm

Re: NFO VDS will not connect to external MYSQL database, Hom

Post by dragula »

Edge100x wrote:Continuing on the assumption that the IP it is using is not correct, try having your webhost open it up to all IPs temporarily.
It is the exact same ip I have in my databases.cfg for the server which I have working with my database. Also if you ping box794.bluehost.com it will return that ip address. I have set up my nfoserver exactly the same as my home server as far as database settings and the only thing different is the ip address to allow in remote mysql which I have done for both. I already tried to get them to open up all ip's and they said they can not because it is a shared ip address. www.s4lservers.com/tf2stats this is the location on my website that all the data is sent to from the database. It has been working for over 3 months now. Plus I can not even get the simplest of database specific plugins to work on the nfoserver even slightly.
dragula
A semi-regular
A semi-regular
Posts: 20
Joined: Mon Jan 28, 2013 1:11 pm

Re: NFO VDS will not connect to external MYSQL database, Hom

Post by dragula »

soja wrote:Are you sure the mysql server is on the same box as the web host? Does cPanel give you a different mysql IP address in the left pane of the main page? I can't remember if it will show this, perhaps check phpmyadmin and see if it says localhost, and check the domain you are on when using phpmyadmin. I think I had this experience with a different web host.
This is all of the info given in the left pane on cpanel:

Main Domain adhplubricantsusa.com
Username ******
Home Directory /home5/*****
Last login from 65.33.48.224
File Count 19377
Email Accounts 7 / ?
Subdomains 1 / ?
Parked Domains 1 / ?
Addon Domains 1 / ?
FTP Accounts 0 / ?
Mailing Lists 0 / ?
All SQL Databases 7 / ?
MySQL Databases 7
PostgreSQL Databases 0
Account Expires In 352 days
Hosting package Platinum Pak
Hostname box794.bluehost.com
cPanel Version 11.32.5 (build 17)
Theme bluehost
Apache version 2.2.23
PHP version 5.2.17
MySQL version 5.5.29-log
Architecture x86_64
Operating system linux
Shared IP Address 66.147.244.94
Path to sendmail /usr/sbin/sendmail
Path to Perl /usr/bin/perl
Kernel version 2.6.32-20130101.60.1.bh6.x86_64
cPanel Pro 1.0 (RC1)

And yes phpmyadmin does indeed say localhost. Going to do the last thing you said, check the domain name im on when in phpmyadmin
.=QUACK=.Major.Pain
This is my homepage
This is my homepage
Posts: 1573
Joined: Sun Jun 26, 2011 8:03 am

Re: NFO VDS will not connect to external MYSQL database, Hom

Post by .=QUACK=.Major.Pain »

Have you tried using the url instead of the ip in your databases.cfg?
Maybe your main domain? Main Domain adhplubricantsusa.com

Does the VDS require anything Windows related to be installed?

Also, maybe post your databases.cfg minus any passwords.
Visit gspreviews.com And Rate & Review Your Old & Current GSP's
Find Your GSP Coupons at gspreviews.com/coupons/
dragula
A semi-regular
A semi-regular
Posts: 20
Joined: Mon Jan 28, 2013 1:11 pm

Re: NFO VDS will not connect to external MYSQL database, Hom

Post by dragula »

Code: Select all

"Databases"
{
	"driver_default"		"mysql"
	
	// When specifying "host", you may use an IP address, a hostname, or a socket file path
	
	"tf2stats"
	{
		"driver"			"mysql"
		"host"				"box794.bluehost.com"
		"database"		"elkalubu_tf2stats_test"
		"user"				"elkalubu_test"
		"pass"				"******"
		//"timeout"		"0"
		"port"			  "3306"
	}
	
	"storage-local"
	{
		"driver"			"sqlite"
		"database"			"sourcemod-local"
	}

	"clientprefs"
	{
		"driver"			"sqlite"
		"host"				"localhost"
		"database"			"clientprefs-sqlite"
		"user"				"root"
		"pass"				""
		//"timeout"			"0"
		//"port"			"0"
	}
}
My last attpmt I put in box794.bluehost.com and that did not work but I ahve also put in the ip address 66.147.244.94 and of course no workie. I have not tried the adhplubricantsusa url though. that is my home business and my gaming community website is on the same box just different url. Makes sense to try the main url. Ill try that now and report back.

Edit: Not sure what you mean about asking if the VDS require anything windows related to be installed? But you brought something to my attention. My home server is running on windows 8 and the VDS is linux. I dont know if that means anything?
dragula
A semi-regular
A semi-regular
Posts: 20
Joined: Mon Jan 28, 2013 1:11 pm

Re: NFO VDS will not connect to external MYSQL database, Hom

Post by dragula »

I just went into phpmyadmin and the url of the page is https://box794.bluehost.com:2083/3rdparty/phpMyAdmin So I imagine that verifies the database is on the same box as the webserver.
Post Reply