Page 1 of 1

Need help with mysql saving

Posted: Sat Aug 18, 2007 4:21 pm
by HaNz_BrIx
SO im trying to set up mysql to have all the war3ft stuff save to it but this is what im getting in the log file.


L 08/18/2007 - 18:10:15: [war3ft.amxx] [MYSQLX] Database Connection Failed: [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

when i join the server, war3ft is running but i am not able to choose a race

this is what i have for the sql.cfg

amx_sql_host "66.55.132.**"
amx_sql_user "c47****"
amx_sql_pass "han**"
amx_sql_db "CS"
amx_sql_table "admins"
amx_sql_type "mysql"


--- Please enter the following information for support ---
War3ft Version: 3.0 RC8
Amxmodx Version: newest
Metamod Version:
amxx list:
amxx modules:
meta list:

Posted: Sat Aug 18, 2007 4:36 pm
by YamiKaitou
You need to configure the SQL info in the war3ft.cfg file

Posted: Sat Aug 18, 2007 4:38 pm
by HaNz_BrIx
yeah ive changed the war3ft.cfg file to have it save via mysql

Posted: Sat Aug 18, 2007 4:51 pm
by HaNz_BrIx
now its saying this

L 08/18/2007 - 18:49:17: [war3ft.amxx] [MYSQLX] Database Connection Failed: [2013] Lost connection to MySQL server during query
L

the races still will not appear and it crashes when you change maps

Posted: Sat Aug 18, 2007 5:39 pm
by Daver
Hanz,
In your sql.cfg you posted admins as the table for the database. Thats how you setup your admins for the server through that cfg file. You need to change the war.cfg and for version 3.0 rc8 you dont use the "amx_sql_table "war3users" at all anymore, I guess the database makes the tables when you connect the server to it at startup.

Good luck.

Daver

Posted: Sat Aug 18, 2007 7:00 pm
by HaNz_BrIx
ok daver so what your saying is that i should be taking out "admins" from my sql.cfg and leaving it just as ""?

im using the ip address from the database as the host name is that what i should be doing?

Posted: Sat Aug 18, 2007 7:03 pm
by SmokingJoePot
Make sure you configured your modules.ini file and enable which form of saving your gonna use, but removing the ; in front of the line.
; -------------------------------------------
; Database Access - only enable one of these
; -------------------------------------------
; MySQL
mysql_amxx_i386.so
; PostgreSQL
;pgsql_amxx_i386.so
;pgsql_amxx.dll
; Microsoft SQL
;mssql_amxx.dll
; SQLite
;sqlite_amxx.dll
;sqlite_amxx_i386.so
;sqlite_amxx_amd64.so

Posted: Sat Aug 18, 2007 7:11 pm
by HaNz_BrIx
my module.ini file doesnt look like that


;;;
; 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

Posted: Sat Aug 18, 2007 7:32 pm
by HaNz_BrIx
ok its saying this now


L 08/18/2007 - 21:30:59: [war3ft.amxx] [MYSQLX] Database Connection Failed: [1045] Access denied for user 'c477521_hanz'@'63.208.142.102' (using password: YES)

Posted: Sat Aug 18, 2007 9:33 pm
by YamiKaitou
I have a feeling that you have the database name incorrect. Verify that you have the correct details

Posted: Sun Aug 19, 2007 12:25 pm
by HaNz_BrIx
no i have the db name correct

Posted: Sun Aug 19, 2007 1:10 pm
by YamiKaitou
If you are using Gameservers as your host and CS as the database name, then it is wrong. The db name would be c477521_CS. Also, make sure that you have granted that user access to the database server

Posted: Sun Aug 19, 2007 2:43 pm
by HaNz_BrIx
thats what ive tried, ive tried it all, ive added the correct user too, which would be c477521_hanz

Posted: Sun Aug 19, 2007 8:40 pm
by YamiKaitou
Does the gameserver have access to the MySQL database? You have to grant it access first

Posted: Mon Aug 20, 2007 11:16 am
by HaNz_BrIx
where would i give it access at?

Posted: Mon Aug 20, 2007 11:46 am
by YamiKaitou
In cPanel, when you select the MySQL Databases link, it will be at the bottom. Either add the server ip or add %

In anything else, contact your host

Posted: Mon Aug 20, 2007 12:20 pm
by HaNz_BrIx
well i added my server ip and still says the same thing, the races also still will not show up

Posted: Mon Aug 20, 2007 12:27 pm
by HaNz_BrIx
this is what i have for the sql.cfg

amx_sql_host "66.55.132.**"
amx_sql_user "c477521_******"
amx_sql_pass "han**"
amx_sql_db "c477521_CS"
amx_sql_table ""
amx_sql_type "mysql"

and war3ft.cfg


wc3_sql_dbhost "66.55.132.33:20**" // Host Name
wc3_sql_dbuser "c477521_*****" // User Name
wc3_sql_dbpass "*****" // Password
wc3_sql_dbname "c477521_CS" // Database Name

when i just tried using the password without c477521_ the server crashed on a map change, i checked the log file and it said this

14:28:07: [war3ft.amxx] [MYSQLX] Database Connection Failed: [2013] Lost connection to MySQL server during query

Posted: Mon Aug 20, 2007 1:50 pm
by YamiKaitou
Remove the port from the host name

Posted: Mon Aug 20, 2007 3:36 pm
by HaNz_BrIx
mmmhm now everything seems to be working but i dont have admin abilites, i checked my log file and it says i connected as admin but in the game i cant get to anything

Posted: Mon Aug 20, 2007 3:50 pm
by YamiKaitou
Can you access amxmodmenu? Or any of the other base AmxX commands?

Posted: Mon Aug 20, 2007 4:49 pm
by HaNz_BrIx
nope, nothing. Cant change map or anything

Posted: Mon Aug 20, 2007 5:30 pm
by YamiKaitou
Then verify that you are actually being granted your admin powers. Make sure that you have all of the details correct and everything

Posted: Mon Aug 20, 2007 9:31 pm
by HaNz_BrIx
i am positive i have admin powers, it worked right before everything started to work then shut off when i got mysql to work

Posted: Mon Aug 20, 2007 10:00 pm
by Daver
Can I ask if you how the gameserer granted access? Is it simply through the war3.cfg or do you have to do somethng else in mysql or somewhere else to grant access for the gameserver? My database is at m6y website and the server is in different location. CHicago and NY...

Thx,
Daver

Posted: Mon Aug 20, 2007 11:51 pm
by HaNz_BrIx
by gameserver you mean the clanserver mysql db? if so then i just edited the war3 and sql cfg files as well as setting everything up for the mysql db through clanservers.

i just tested it and xp saves and all that good stuff, no crashes, but still dont have my admin powers even though my log files are saying i connected as admin

Posted: Tue Aug 21, 2007 7:25 am
by YamiKaitou
What flags are you giving yourself for your admin?

Posted: Tue Aug 21, 2007 10:30 am
by HaNz_BrIx
"abcdefghijklmu"

Posted: Tue Aug 21, 2007 10:56 am
by YamiKaitou
Okay, if you can't access any admin commands at all, including the ones that come with AmxModX, then you have something configured wrong

Posted: Tue Aug 21, 2007 1:30 pm
by HaNz_BrIx
yeah its weird though because they worked when mysql wasnt working then once it started working it stopped

Posted: Wed Aug 22, 2007 12:27 pm
by HaNz_BrIx
should i try something with the adminsql.amxx file
?

Posted: Wed Aug 22, 2007 12:34 pm
by YamiKaitou
admin_sql.amxx is used only if you are loading the admins via SQL. If you are wanting to use the users.ini file, admin.amxx reads that.

Posted: Wed Aug 22, 2007 1:15 pm
by HaNz_BrIx
then what else could maybe be the problem of me not being able to get the powers in game?

Posted: Wed Aug 22, 2007 2:11 pm
by YamiKaitou
Non-Steam, CS1.5?

Posted: Wed Aug 22, 2007 4:40 pm
by HaNz_BrIx
im using both the newest version of cs and steam

Posted: Wed Aug 22, 2007 5:20 pm
by YamiKaitou
Please provide the output of the following commands when typed into the SERVER Console or RCON

meta list
amxx plugins
amxx modules
status

Posted: Wed Aug 22, 2007 5:39 pm
by HaNz_BrIx
well i just deleted everything from the server so i cant provide you with that, but now nothing will work, no amxx no war3ft. god

Posted: Thu Aug 23, 2007 9:35 pm
by Daver
HaNz_BrIx wrote:this is what i have for the sql.cfg

amx_sql_host "66.55.132.**"
amx_sql_user "c477521_******"
amx_sql_pass "han**"
amx_sql_db "c477521_CS"
amx_sql_table ""
amx_sql_type "mysql"

and war3ft.cfg


wc3_sql_dbhost "66.55.132.33:20**" // Host Name
wc3_sql_dbuser "c477521_*****" // User Name
wc3_sql_dbpass "*****" // Password
wc3_sql_dbname "c477521_CS" // Database Name

when i just tried using the password without c477521_ the server crashed on a map change, i checked the log file and it said this

14:28:07: [war3ft.amxx] [MYSQLX] Database Connection Failed: [2013] Lost connection to MySQL server during query
Hanz can you post your exact war3.cfg data connections here, change the numbers if you like I just need to asee the connect info, cuz i cant connect to the database with gamesevers mysql database at all...

Thx,

Daver

Posted: Fri Aug 24, 2007 1:08 pm
by HaNz_BrIx
daver, ill send you a PM on your site with all my actually info