mySQL Access not working

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
User avatar
vman315
New to forums
New to forums
Posts: 5
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Mon Sep 10, 2012 7:15 pm

mySQL Access not working

Post by vman315 »

Mod: TF2
Problem: SourceBans is not adding admins, however it does ban players.
Error:

Code: Select all

21:11:37 L 01/06/2013 - 21:11:44: [admin-sql-prefetch.smx] Could not connect to database "default": [2003]: Can't connect to MySQL server on 'localhost' (10061)

21:11:37 L 01/06/2013 - 21:11:45: [admin-sql-prefetch.smx] Could not connect to database "default": [2003]: Can't connect to MySQL server on 'localhost' (10061)

21:11:37 L 01/06/2013 - 21:11:46: [admin-sql-prefetch.smx] Could not connect to database "default": [2003]: Can't connect to MySQL server on 'localhost' (10061)
Database.cfg

Code: Select all

"Databases"
{
	"driver_default"		"mysql"
	
	// When specifying "host", you may use an IP address, a hostname, or a socket file path
	
	"default"
	{
		"driver"			"default"
		"host"				"localhost"
		"database"			"sourcemod"
		"user"				"root"
		"pass"				""
		//"timeout"			"0"
		//"port"			"0"
	}
	"sourcebans"
	{
		"driver"			"mysql"
		"host"				"keymodtf2.site.nfoservers.com"
		"database"			"keymodtf2_bans"
		"user"				"keymodtf2"
		"pass"				"nosoupforyou"
		//"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"
	}	
}
Plugin List:

Code: Select all

           01 "Admin File Reader" (1.5.0-dev+3734) by AlliedModders LLC
           02 "SQL Admins (Prefetch)" (1.5.0-dev+3734) by AlliedModders LLC
           03 "SQL Admins (Threaded)" (1.5.0-dev+3734) by AlliedModders LLC
           04 "Admin Help" (1.5.0-dev+3734) by AlliedModders LLC
           05 "Admin Menu" (1.5.0-dev+3734) by AlliedModders LLC
           06 "amp_node" (4.3) by -=|JFH|=-Naris, Eggman, Geel9, Murphy7 and Benjamuffin 
           07 "Anti-Flood" (1.5.0-dev+3734) by AlliedModders LLC
           08 "Basic Chat" (1.5.0-dev+3734) by AlliedModders LLC
           09 "Basic Comm Control" (1.5.0-dev+3734) by AlliedModders LLC
           10 "Basic Commands" (1.5.0-dev+3734) by AlliedModders LLC
           11 "Basic Info Triggers" (1.5.0-dev+3734) by AlliedModders LLC
           12 "Basic Votes" (1.5.0-dev+3734) by AlliedModders LLC
           13 "Client Preferences" (1.5.0-dev+3734) by AlliedModders LLC
           14 "Freak Fortress 2: Boss Selection" by RainBolt Dash
           15 "Freak Fortress 2" (1.06h) by Rainbolt Dash, FlaminSarge
           16 "Fun Commands" (1.5.0-dev+3734) by AlliedModders LLC
           17 "Fun Votes" (1.5.0-dev+3734) by AlliedModders LLC
           18 "[TF2] Ghost Mode" (1.5) by FlaminSarge
           19 "[TF2] Monoculus Spawner" (1.1.1) by DarthNinja
           20 "[TF2] High Five Enemies" (1.2) by FlaminSarge
           21 "MapChooser" (1.5.0-dev+3734) by AlliedModders LLC
           22 "Nextmap" (1.5.0-dev+3734) by AlliedModders LLC
           23 "Map Nominations" (1.5.0-dev+3734) by AlliedModders LLC
           24 "Player Commands" (1.5.0-dev+3734) by AlliedModders LLC
           25 "SourceMod Radio" (1.0.0.13) by dubbeh
           26 "[TF2] Rainbowize" (1.6.2) by Dr. McKay
           27 "Reserved Slots" (1.5.0-dev+3734) by AlliedModders LLC
           28 "Resource Manager" (2.3) by -=|JFH|=-Naris
           29 "Rock The Vote" (1.5.0-dev+3734) by AlliedModders LLC
           30 "[TF2] Set Player Class" (1.0.1) by DarthNinja
           31 "Simple Chat Colors" (2.0.0) by Simple Plugins
           32 "Simple Chat Processor" (1.0.1) by Simple Plugins
           33 "Evil Admin - Beam" (1.0.100) by <eVa>Dog
           34 "Evil Admin - Pimp Slap" (1.0.102) by <eVa>Dog
           35 "Evil Admin - Trails" (1.0.104) by <eVa>Dog
           36 "Sound Commands" (1.5.0-dev+3734) by AlliedModders LLC
           37 "SourceBans" (1.4.10) by SourceBans Development Team
           38 "SQL Admin Manager" (1.5.0-dev+3734) by AlliedModders LLC
           39 "[TF2] Capture Toggle" (0.0.3) by AW 'Swixel' Stanley
           40 "Taunt Crits" (1.6) by HeMe3iC
           41 "[TF2Items] Manager" (1.4.1) by Damizean & Asherkin
           42 "[TF2] Rate of Fire" (1.2) by EHG
           43 "[TF2] Thirdperson" (2.1.0) by DarthNinja
           44 "Freak Fortress 2: Default Abilities" by RainBolt Dash
           45 "Freak Fortress 2: Abilities of 1st set" by RainBolt Dash
           46 "Freak Fortress 2: Saxtoner Ability Pack (1.2)" by Otokiru
           47 "Freak Fortress 2: rage_overlay" by Jery0987, RainBolt Dash
           48 "Freak Fortress 2: special_noanims" by RainBolt Dash
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: mySQL Access not working

Post by Edge100x »

The error message there suggests that it is trying to use the "default" profile, which has invalid MySQL information.
User avatar
vman315
New to forums
New to forums
Posts: 5
Joined: Mon Sep 10, 2012 7:15 pm

Re: mySQL Access not working

Post by vman315 »

And how do I fix it?
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: mySQL Access not working

Post by Edge100x »

In the databases.cfg file that you quoted, there is a "default" section where you can set correct information.
User avatar
vman315
New to forums
New to forums
Posts: 5
Joined: Mon Sep 10, 2012 7:15 pm

Re: mySQL Access not working

Post by vman315 »

Will try.
How ever there is another problem I also have a donations page that needs to be able to add donators steamids to the admin list aswell. Won't doing this cause problems with the rest of the databases.
User avatar
vman315
New to forums
New to forums
Posts: 5
Joined: Mon Sep 10, 2012 7:15 pm

Re: mySQL Access not working

Post by vman315 »

That did not fix the problem.
Would you please post a [code][/code] of what you believe would be the correct settings.
User avatar
vman315
New to forums
New to forums
Posts: 5
Joined: Mon Sep 10, 2012 7:15 pm

Re: mySQL Access not working

Post by vman315 »

New Error:

Code: Select all

22:16:25 L 01/06/2013 - 22:16:33: [admin-sql-prefetch.smx] FetchGroups() query failed: SELECT flags, name, immunity_level FROM sm_groups

22:16:25 L 01/06/2013 - 22:16:33: [admin-sql-prefetch.smx] Query error: Table 'keymodtf2_bans.sm_groups' doesn't exist

22:16:25 L 01/06/2013 - 22:16:33: [admin-flatfile.smx] Error(s) detected parsing addons\sourcemod\configs\admins_simple.ini

22:16:25 L 01/06/2013 - 22:16:33: [admin-flatfile.smx]  (line 3) Failed to bind identity  (method name)

22:16:25 L 01/06/2013 - 22:16:33: [admin-flatfile.smx]  (line 3) Failed to bind identity  (method name)

22:16:25 L 01/06/2013 - 22:16:34: [admin-sql-prefetch.smx] FetchUsers() query failed: SELECT id, authtype, identity, password, flags, name, immunity FROM sm_admins

22:16:25 L 01/06/2013 - 22:16:34: [admin-sql-prefetch.smx] Query error: Table 'keymodtf2_bans.sm_admins' doesn't exist

22:16:25 L 01/06/2013 - 22:16:34: [admin-sql-prefetch.smx] FetchOverrides() query failed: SELECT type, name, flags FROM sm_overrides

22:16:25 L 01/06/2013 - 22:16:34: [admin-sql-prefetch.smx] Query error: Table 'keymodtf2_bans.sm_overrides' doesn't exist
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: mySQL Access not working

Post by Edge100x »

From these latest errors, it sounds as though the database tables have not been correctly initialized to support MySQL-based Sourcemod admins (which are what it seems you are trying to use). The relevant documentation for this is located here: http://wiki.alliedmods.net/SQL_Admins_% ... d%29#MySQL
Post Reply