Need help with mysql saving

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

Moderator: Forum Moderator

Post Reply
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Need help with mysql saving

Post 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:
User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou »

You need to configure the SQL info in the war3ft.cfg file
Image

No support via PM or Email
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post by HaNz_BrIx »

yeah ive changed the war3ft.cfg file to have it save via mysql
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post 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
Daver
WC3Mods Donor
WC3Mods Donor
Posts: 93
Joined: Sat Jul 09, 2005 2:34 pm
Location: Orland Park, IL.
Contact:

Post 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
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post 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?
SmokingJoePot
Peon
Posts: 12
Joined: Sat Aug 18, 2007 6:58 pm
Location: Dallas TX
Contact:

Post 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
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post 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
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post 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)
User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou »

I have a feeling that you have the database name incorrect. Verify that you have the correct details
Image

No support via PM or Email
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post by HaNz_BrIx »

no i have the db name correct
User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post 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
Image

No support via PM or Email
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post by HaNz_BrIx »

thats what ive tried, ive tried it all, ive added the correct user too, which would be c477521_hanz
User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou »

Does the gameserver have access to the MySQL database? You have to grant it access first
Image

No support via PM or Email
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post by HaNz_BrIx »

where would i give it access at?
User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post 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
Image

No support via PM or Email
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post by HaNz_BrIx »

well i added my server ip and still says the same thing, the races also still will not show up
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post 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
User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou »

Remove the port from the host name
Image

No support via PM or Email
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post 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
User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou »

Can you access amxmodmenu? Or any of the other base AmxX commands?
Image

No support via PM or Email
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post by HaNz_BrIx »

nope, nothing. Cant change map or anything
User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post 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
Image

No support via PM or Email
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post 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
Daver
WC3Mods Donor
WC3Mods Donor
Posts: 93
Joined: Sat Jul 09, 2005 2:34 pm
Location: Orland Park, IL.
Contact:

Post 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
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post 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
User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou »

What flags are you giving yourself for your admin?
Image

No support via PM or Email
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post by HaNz_BrIx »

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

Post 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
Image

No support via PM or Email
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post by HaNz_BrIx »

yeah its weird though because they worked when mysql wasnt working then once it started working it stopped
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post by HaNz_BrIx »

should i try something with the adminsql.amxx file
?
User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post 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.
Image

No support via PM or Email
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post by HaNz_BrIx »

then what else could maybe be the problem of me not being able to get the powers in game?
User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou »

Non-Steam, CS1.5?
Image

No support via PM or Email
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post by HaNz_BrIx »

im using both the newest version of cs and steam
User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post 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
Image

No support via PM or Email
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post 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
Daver
WC3Mods Donor
WC3Mods Donor
Posts: 93
Joined: Sat Jul 09, 2005 2:34 pm
Location: Orland Park, IL.
Contact:

Post 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
HaNz_BrIx
Peon
Posts: 34
Joined: Mon Jul 25, 2005 10:03 pm

Post by HaNz_BrIx »

daver, ill send you a PM on your site with all my actually info
Post Reply