Raised This Month: $12 Target: $400
 3% 

SQL Admins Connect Issue


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fredd
Veteran Member
Join Date: Jul 2007
Old 04-01-2008 , 04:13   SQL Admins Connect Issue
Reply With Quote #1

aight,

so i created a new db on a external web server then created a user and set the permissions for the user to full and everything.

then i went to the database.cfg and i changed the "default" info to the connect to the db on my external web server

and then ofcourse i went head and moved "sql-admin-manager.smx" and "admin-sql-threaded.smx" from the disabled folder to the main plugins directory.

i reloaded the server and using an gameserver tool(HLSW) i went a head and typed "sm_create_adm_tables" in console and then the server just crashed, well i could say it wasn't really a crash because it came back online within prob 40 seconds with a the following message
Code:
01:38:47 L 04/01/2008 - 02:38:40: [sql-admin-manager.smx] Could not connect to database: [2003]: Can't connect to MySQL server on 'host' (10060)
01:38:47 [SM] Could not connect to the database.
i doubled check my database.cfg with username and password and they were pretty much right

so then i figured that my web server might be blocking the connection so i went a head(cpanel users might be familar with this) "Remote MySQL" and i added my game server ip twice, once with just the ip and second with ip and port attached.

still doesn't work and the same exact thing happens, so the last attempt was to change the hostname name i put from 'name.com' to 'ip address of the domain' and no change occurred still the same issue.

so i want to know
1: have i done something wrong?
2: did i miss anything?
3: do i need to update my SourceMod, im currently on r1946

P.S: i had a very very similar issue with sourcebans where it just didnt want to connect to the mysql database, thats why i dropped it.
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!
Fredd is offline
HSFighter
Veteran Member
Join Date: Aug 2007
Location: Flensburg - Germany
Old 04-01-2008 , 05:52   Re: SQL Admins Connect Issue
Reply With Quote #2

Some MySQL Databases blocking external connections from other servers,
and it is only localhost allowed.

Is the database on the same server some the Gameserver?
When not please contact your provider and check the Permissions from external IP's to the database!

can you post a dump of your "database.cfg" ?
__________________



Sorry for my very bad english
Greetings HSFighter
HSFighter is offline
Send a message via ICQ to HSFighter
Fredd
Veteran Member
Join Date: Jul 2007
Old 04-01-2008 , 16:17   Re: SQL Admins Connect Issue
Reply With Quote #3

as i said, yeah i thought the mysql db was blocking it which is yes on a external server as i said before but i have went to the cpanel and i have added the ip of the server in the 'allowed mysql hosts' list, and over that i have also tried making a simple php script that uses mysql_connect to test things out, if the host is not in the white list it will be blocked if it is it will connect fine.

here is my database.cfg
Code:
"Databases"
{
	"driver_default"		"mysql"
	

	"default"
	{
		"driver"			"default"
		"host"				"i tried the ip and the host name as 'name.com'"
		"database"			"db name"
		"user"				"user name"
		"pass"				"pass"
		//"timeout"			"0"
		"port"				"3306"
	}	
	"storage-local"
	{
		"driver"			"sqlite"
		"database"			"sourcemod-local"
	}
}
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!
Fredd is offline
BAILOPAN
Join Date: Jan 2004
Old 04-01-2008 , 17:56   Re: SQL Admins Connect Issue
Reply With Quote #4

If a connection can't be established between the MySQL client and the MySQL server, then it's not really a problem on SourceMod's (or SourceBan's) end.

One thing you should make sure is that your whitelist has the correct IP. For example, if a box has multiple IP addresses, then you have to choose the correct outbound one(s) being used for your whitelist.
__________________
egg
BAILOPAN is offline
Fredd
Veteran Member
Join Date: Jul 2007
Old 04-01-2008 , 18:15   Re: SQL Admins Connect Issue
Reply With Quote #5

yeah thanks, the problem was i need to use 'static-ipaddress' or the '%.gamerserverprovider'
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!
Fredd is offline
zerosin
Member
Join Date: Sep 2005
Location: San Francisco
Old 01-13-2009 , 04:32   Re: SQL Admins Connect Issue
Reply With Quote #6

Hi there,
I'm new to this to please bear with me... I'm having very similar issues with Fredd, and I need help with this part of my move from Mani to SourceMoD.

Everything is setup properly on the database server, tables and everything looks good. Using the latest build of sourcemod

SourceMod Version: 1.1.0
SourcePawn Engine: SourcePawn 1.1, jit-x86 (build 1.1.0)
SourcePawn API: v1 = 4, v2 = 2
Compiled on: Dec 28 2008 17:19:51
Build ID: 2439:62cc69f6aa8b

But I'm having problems with the gameserver and the database server to talk to each other.

I'm getting this error when I run this in console sm_create_adm_tables:
[sql-admin-manager.smx] Could not connect to database: [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[SM] Could not connect to the database.

Here is my database.cfg:

"Databases"
{
"driver_default" "mysql"

"default"
{
"driver" "default"
"host" "db1849.perfora.net"
"database" "XXXXX"
"user" "XXXXXX"
"pass" "XXXXXX"
//"timeout" "0"
"port" "3306"
}


"storage-local"
{
"driver" "sqlite"
"database" "sourcemod-local"
}


}

I just need this last addition to install sourcebans, map rate, and I'll be done with this test server.

The gameserver is at a private colo, running 8 game services and only 1 is running sourcemod, database server is located somewhere else.

Any help would be greatly appreciated

Last edited by zerosin; 01-13-2009 at 04:37.
zerosin is offline
Kajool
BANNED
Join Date: Dec 2010
Old 12-17-2010 , 07:25   Re: SQL Admins Connect Issue
Reply With Quote #7

Informative issue
Kajool is offline
Sniper214
SourceMod Donor
Join Date: Jul 2008
Location: Canby, OR USA
Old 12-17-2010 , 12:24   Re: SQL Admins Connect Issue
Reply With Quote #8

The latest SM is not 1.1, latest stable is 1.36. Download that and install it. And like above make sure your address is whitelisted with your host provider.
Sniper214 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode