XP save to MySQL

Read log files for errors! If this fails, come here for help

Moderator: Forum Moderator

Post Reply
eX
Peon
Posts: 8
Joined: Tue Jun 03, 2008 12:10 pm

XP save to MySQL

Post by eX » Sun Jun 08, 2008 4:23 am

Im using:
RC11
AMX Mod X 1.8.0
MetaMod v1.19p32
MySQL 5.0.45

I've a problem with XP save to MySQL

Code: Select all

[WAR3FT] MySQL X database connection successful
L 06/08/2008 - 11:47:33: [war3ft.amxx] [MYSQLX] Error in querying database, location: 1
L 06/08/2008 - 11:47:33: [MYSQLX] Error in querying database, location: 1
L 06/08/2008 - 11:47:33: [war3ft.amxx] [MYSQLX] Message: near "unsigned": syntax error (1)
L 06/08/2008 - 11:47:33: [MYSQLX] Message: near "unsigned": syntax error (1)
L 06/08/2008 - 11:47:33: [war3ft.amxx] [MYSQLX] Query statement: CREATE TABLE IF NOT EXISTS `wc3_player` ( `player_id` int(8) unsigned NOT NULL auto_increment, `player_steamid` varchar(25) NOT NULL default '', `player_ip` varchar(20) NOT NULL default '', `player_name` varchar(35) NOT NULL default '', `time` timestamp(14) NOT NULL, PRIMARY KEY  (`player_id`), KEY `player_name` (`pL 06/08/2008 - 11:47:33: [MYSQLX] Query statement: CREATE TABLE IF NOT EXISTS `wc3_player` ( `player_id` int(8) unsigned NOT NULL auto_increment, `player_steamid` varchar(25) NOT NULL default '', `player_ip` varchar(20) NOT NULL default '', `player_name` varchar(35) NOT NULL default '', `time` timestamp(14) NOT NULL, PRIMARY KEY  (`player_id`), KEY `player_name` (`player_name`), L 06/08/2008 - 11:47:33: [war3ft.amxx] [MYSQLX] Error in querying database, location: 7
L 06/08/2008 - 11:47:33: [MYSQLX] Error in querying database, location: 7
L 06/08/2008 - 11:47:33: [war3ft.amxx] [MYSQLX] Message: no such table: wc3_config (1)
L 06/08/2008 - 11:47:33: [MYSQLX] Message: no such table: wc3_config (1)
L 06/08/2008 - 11:47:33: [war3ft.amxx] [MYSQLX] Query statement: REPLACE INTO `wc3_config` ( `config_id`, `config_value` ) VALUES ( 'level0_xp', '0' );
L 06/08/2008 - 11:47:33: [MYSQLX] Query statement: REPLACE INTO `wc3_config` ( `config_id`, `config_value` ) VALUES ( 'level0_xp', '0' );
L 06/08/2008 - 11:47:33: [war3ft.amxx] [MYSQLX] Error in querying database, location: 12
L 06/08/2008 - 11:47:33: [MYSQLX] Error in querying database, location: 12
L 06/08/2008 - 11:47:33: [war3ft.amxx] [MYSQLX] Message: no such table: information_schema.tables (1)
L 06/08/2008 - 11:47:33: [MYSQLX] Message: no such table: information_schema.tables (1)
L 06/08/2008 - 11:47:33: [war3ft.amxx] [MYSQLX] Query statement: SELECT count(*) FROM information_schema.tables WHERE table_schema = 'pr0' AND table_name = 'war3users';
L 06/08/2008 - 11:47:33: [MYSQLX] Query statement: SELECT count(*) FROM information_schema.tables WHERE table_schema = 'pr0' AND table_name = 'war3users';

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Sun Jun 08, 2008 9:52 am

version of MySQL?
No Support via PM

eX
Peon
Posts: 8
Joined: Tue Jun 03, 2008 12:10 pm

Post by eX » Sun Jun 08, 2008 10:05 am

Geesu wrote:version of MySQL?
MySQL 5.0.45



I saw an error. I wrote a bad password in war3FT.cfg and sql.cfg and it still writes the same error what above.

I'm surprised that it still writes:
[WAR3FT] MySQL X database connection successfu
despite of bad pass. Is it fine ?

Code: Select all

war3FT.cfg
---------------------


wc3_save_xp		1		// Enables saving of experience (default is 0)
wc3_save_xp_db		1		// How should we save XP? (0 = SQLite, 1 = MySQL)

wc3_save_by		2		// What should I save this as?  steam id = 0, IP = 1, name = 2 (default is 0)
wc3_save_pruning	0		// Automatically prunes the database of old users at a mapchange (default is 0)
wc3_days_before_delete	31		// However many days before deleting XP or pruning from the database (default is 31)
wc3_save_end_round	1		// Save xp at the end of each round (may cause lag, default is 1)


// SQL Database Information

wc3_sql_dbhost		"78.46.35.138"	// Host Name
wc3_sql_dbuser		"pr0_xp"		// User Name
wc3_sql_dbpass		"*pass*"		// Password
wc3_sql_dbname		"pr0_xp"		// Database Name

Code: Select all

sql.cfg
---------------------


amx_sql_host	"78.46.35.138"
amx_sql_user	"pr0_xp"
amx_sql_pass	"*pass*"
amx_sql_db	"pr0_xp"
amx_sql_table	"admins"
amx_sql_type	"mysql"



Code: Select all

plugins.ini
---------------------


linux addons/amxmodx/dlls/amxmodx_mm_i386.so
linux addons/amxmodx/modules/mysql_amxx_i386.so 
linux addons/amxmodx/modules/fun_mm_i586.so
linux addons/amxmodx/modules/geoip_amxx_i386.so
linux addons/amxmodx/modules/sockets_amxx_i386.so
linux addons/amxmodx/modules/regex_amxx_i386.so
linux addons/amxmodx/modules/nvault_amxx_i386.so

Code: Select all

meta list
---------------------


Currently running plugins:
 [  1] AMX Mod X, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [  2] MySQL, v1.8.0.3662, Oct 29 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org/
 [  3] Fun, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [  4] CStrike, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [  5] CSX, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org/
 [  6] Engine, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [  7] SQLite, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org/
 [  8] FakeMeta, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [  9] Ham Sandwich, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org
9 plugin



Code: Select all

modules.ini
---------------------


; To enable a module, remove the semi-colon (;) in front of its name.
; If it's not here, simply add it its name, one per line.
; You don't need to write the _amxx part or the file extension.
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SQL Modules usually need to be enabled manually ;;
;; You can have any number on at a time.  Use      ;;
;;  amx_sql_type in sql.cfg to specify the default ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

mysql
;sqlite

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Put third party modules below here.              ;;
;; You can just list their names, without the _amxx ;;
;;  or file extension.                              ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; These modules will be auto-detected and loaded   ;;
;;  as needed.  You do not need to enable them here ;;
;;  unless you have problems.                       ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

fun
;engine
;fakemeta
;geoip
;sockets
;regex
;nvault
cstrike
csx

Code: Select all

amx modules
---------------------


Aktualnie zaladowane moduly:
nazwa                   wersja      autor                status     
unknown                 unknown     unknown              bad load   
Fun                     1.8.0.3660  AMX Mod X Dev Team   running    
CStrike                 1.8.0.3660  AMX Mod X Dev Team   running    
CSX                     1.8.0.3660  AMX Mod X Dev Team   running    
Engine                  1.8.0.3660  AMX Mod X Dev Team   running    
SQLite                  1.8.0.3660  AMX Mod X Dev Team   running    
FakeMeta                1.8.0.3660  AMX Mod X Dev Team   running    
Ham Sandwich            1.8.0.3660  AMX Mod X Dev Team   running

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Sun Jun 08, 2008 4:47 pm

Can you post a dump of your database file?
No Support via PM

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou » Sun Jun 08, 2008 10:37 pm

Make the plugins.ini file ONLY load the amxx file. Do Not load AMXx modules in there
Image

No support via PM or Email

eX
Peon
Posts: 8
Joined: Tue Jun 03, 2008 12:10 pm

Post by eX » Thu Jun 12, 2008 4:57 am

Geesu wrote:Can you post a dump of your database file?
They're add to this post.





OK. Now it's writing (on correct & incorrect pass the same):

Code: Select all

L 06/12/2008 - 12:12:03: [war3ft.amxx] [MYSQLX] Database Connection Failed: [1045] Access denied for user 'pr0'@'s2.gradobicie.pl' (using password: YES)
L 06/12/2008 - 12:12:03: [MYSQLX] Database Connection Failed: [1045] Access denied for user 'pr0'@'s2.gradobicie.pl' (using password: YES)
(I have server from gradobicie.pl)




Code: Select all

plugins.ini
--------------------- 

linux addons/amxmodx/dlls/amxmodx_mm_i386.so

Code: Select all

meta list
--------------------- 

Currently running plugins:
 [  1] AMX Mod X, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [  2] MySQL, v1.8.0.3662, Oct 29 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org/
 [  3] Fun, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [  4] CStrike, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [  5] CSX, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org/
 [  6] Engine, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [  7] SQLite, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org/
 [  8] FakeMeta, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [  9] Ham Sandwich, v1.8.0.3660, Oct 25 2007, by AMX Mod X Dev Team, see http://www.amxmodx.org



Code: Select all

modules.ini
---------------------


; To enable a module, remove the semi-colon (;) in front of its name.
; If it's not here, simply add it its name, one per line.
; You don't need to write the _amxx part or the file extension.
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SQL Modules usually need to be enabled manually ;;
;; You can have any number on at a time.  Use      ;;
;;  amx_sql_type in sql.cfg to specify the default ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

mysql
;sqlite

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Put third party modules below here.              ;;
;; You can just list their names, without the _amxx ;;
;;  or file extension.                              ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; These modules will be auto-detected and loaded   ;;
;;  as needed.  You do not need to enable them here ;;
;;  unless you have problems.                       ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

fun
;engine
;fakemeta
;geoip
;sockets
;regex
;nvault
cstrike
csx

Code: Select all

amx modules
--------------------- 

nazwa                   wersja      autor                status     
MySQL                   1.8.0.3662  AMX Mod X Dev Team   running    
Fun                     1.8.0.3660  AMX Mod X Dev Team   running    
CStrike                 1.8.0.3660  AMX Mod X Dev Team   running    
CSX                     1.8.0.3660  AMX Mod X Dev Team   running    
Engine                  1.8.0.3660  AMX Mod X Dev Team   running    
SQLite                  1.8.0.3660  AMX Mod X Dev Team   running    
FakeMeta                1.8.0.3660  AMX Mod X Dev Team   running    
Ham Sandwich            1.8.0.3660  AMX Mod X Dev Team   running
Attachments
database_file_eX.rar
database files eX
(837.75 KiB) Downloaded 455 times

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou » Thu Jun 12, 2008 6:23 am

That user does not have access to connect to the MySQL server using the gameservers ip. Grant it permission on that IP and it should work better
Image

No support via PM or Email

eX
Peon
Posts: 8
Joined: Tue Jun 03, 2008 12:10 pm

Post by eX » Thu Jun 12, 2008 7:13 am

YamiKaitou wrote:That user does not have access to connect to the MySQL server using the gameservers ip. Grant it permission on that IP and it should work better
So I should get permission IP adress my game server on server witch I have MySQL or inversely?

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou » Thu Jun 12, 2008 8:21 am

If your servers ip is 143.16.132.75, then you need to grant permission for that IP to access the MySQL server. If you are not sure how to do that, get up with your MySQL provider and ask them
Image

No support via PM or Email

Post Reply