Page 1 of 1

Help with save by sql

Posted: Sun Nov 27, 2005 12:59 pm
by cjohn89
Im trying to get the xp saved by sql, i turned it on in in war3FT.cgf but it doesnt even show the people have 0 xp, and doesnt save... The game works fine, it just doesnt want to save anything

Wc3FT.cfg

mp_savexp 1 // Enables saving of experience (uses a vault, default is 0)
sv_sql 1 // Save using a SQL module (a module needs to be turned on, note: to use this mp_savexp must also be 1, default is 0)
FT_saveby 0 // What should I save this as? steam id = 0, IP = 1, name = 2 (default is 0)

// SQL configuration
FT_sql_host "8.9.3.229:27015" // Host Name
FT_sql_user "China" // User Name
FT_sql_pass "54321" // Password
FT_sql_db "amx" // Database Name
FT_auto_pruning 0 // Automatically prunes the database of old users at a mapchange (default is 0)
sv_daysbeforedelete 30 // However many days before deleting XP or pruning from the database (default is 31)
sv_sqltablename "war3users" // Table Name, no need to change (default is war3users)
sv_save_end_round 1 // Save Users at the end of each round (causes slight lag, default is 1)

What does it mean by FT_sql_db does that mean which sql thing are you using??? like sqlite???

Posted: Sun Nov 27, 2005 7:00 pm
by Geesu
8.9.3.229:27015 should be 8.9.3.229

And is there even a mysql server running ?

FT_sql_db is the database name, and sorry, but generally if you ask this you shouldn't be using MySQL :(

Your server provider should give you this info if it is possible... You can just turn on the sqlite module and not the mysql and it will save as well

Posted: Sun Nov 27, 2005 11:22 pm
by cjohn89
im very good at figuring things out, you have to find out somehow... but the reason i was getting the sql up is because i am trying to use
"Version 1.1 - Updated PHP XP Statistics Page" or download name is xp_statistics_v1.1

but i am still coming up with this error
Warning: mysql_connect(): Lost connection to MySQL server during query in /home/cs106519/public_html/psycho/config.php on line 27
Could not connect : Lost connection to MySQL server during query
^ that is what it shows when i try to go to that site

Do i have this set up right???
Sql.cfg
amx_sql_host "8.9.3.229"
amx_sql_user "root"
amx_sql_pass "****"
amx_sql_db "war3xp"
amx_sql_table "war3users"

war3FT.cfg
mp_savexp 1
sv_sql 1
FT_saveby 0

// SQL configuration
FT_sql_host "8.9.3.229"
FT_sql_user "root"
FT_sql_pass "****"
FT_sql_db "war3xp"
FT_auto_pruning 0
sv_daysbeforedelete 30
sv_sqltablename "war3users"

I also am using sqlite

Just help me, im very quick in learning... i know pretty much everything exept how to get this completely functional ;)...

thank you

Posted: Mon Nov 28, 2005 8:24 am
by Geesu
Can't use sqlite with that download page, turn on the mysql module...

Also, do NOT list your username/pass

Posted: Mon Nov 28, 2005 10:16 pm
by cjohn89
I didnt list my username/password ;), im not stupid lol... anything that i have up there exept ip adress is fake, same setup just differ usernames and passwords... exept info that does not matter...

but when i turn mysql on for the main saving database it shows no xp, and does not save the xp...

Posted: Tue Nov 29, 2005 5:46 am
by jinetix
If the MySQL server is on a different computer, then make sure your game server IP has access to your MySQL server. I had to add some wildcards to the game server IP for it to work properly.

Posted: Tue Nov 29, 2005 3:44 pm
by cjohn89
what do you mean wildcards?

Posted: Tue Nov 29, 2005 4:00 pm
by Geesu
Like basically your mysql server probably only allows access when its local, so you have to tell it to allow you to connect from another server (I use phpmyadmin to do this)

Posted: Tue Nov 29, 2005 10:27 pm
by cjohn89
hee hee, it doesnt sound like im fully even getting what mysql is... could you point me in the direction of some guides??? i asked my serverhosts about the mysql and i just have to check on that...

Posted: Tue Nov 29, 2005 10:31 pm
by cjohn89
well i suppose i will have to wait a while for there response... they are doing some reconstructing and there site is down at moment, so i cant get into my ftp

how do i set up mysql

Posted: Sun Dec 04, 2005 2:33 am
by cjohn89
okae do you know of any good instructions of how to set up mysql with wc3ft... or could you give me some very specific instructions... when i enable mysql it doesnt show anything for xp and it doesnt save any xp

Posted: Sun Dec 04, 2005 10:15 am
by Krazy
First of all do not triple post just edit you last post next time.

I use clanservers as a server provider and they do not give you a mySQL datebase so what you are trying to do is impossible with them. Either use sqlite or vault saving.

Posted: Mon Dec 05, 2005 4:29 pm
by [KM]Saint
I have my servers hosted with a company similiar to clanservers, to use mysql all you need is to get a mysql server at a diff location. It's not very hard. My mysql server is hosted with hostingdepartment.com

Posted: Sat Dec 10, 2005 2:35 am
by cjohn89
so, how much would that run in price???

Posted: Sat Dec 10, 2005 3:50 pm
by erik2k3
alright.... stupid comment bout the login stuff... sry folks...

back to topic :

jst like Geesu said, turn the MySQL module on, then use phpmyadmin to grant a specific user accedd to the db from a different host than localmachine ( 127.0.0.1 ) ...

then what is MySQL ? MySQL is a database server running databases... obvously... mostly you get a database with your webspace but limited in its functions, like only 1 databse and a user without the GRANT priviliege ( otherwise you could set up numerous databases and accounts for yourself and the hoster would have increased traffic / cpu and stuff. ) So, you really cant do this ( depends on your hoster )

BUT : if you do have full access to your db, use, just like Geesu said, phpmyadmin ( usually u can log into it via confixx or any similar web hosting whatever it is calles gui ), once you are inside phpmyadmin you can go to the section "permissions" ( think thts what its called in english ) and select your user, somehwehere you can edit this user then and allow access to the database via his user from certain machines ( in this case your gameserver ) ... and voila... it should be working. But again, all this depends on the hoster where your db is hostet.

Myself, well i do have a VServer ( 3€ a month ) where i can set up as many databases as i want and do whatever i damn well please :)

well... think tht summs it up ???? any more questions ( or maybe i was driftin away from the topic... )

Posted: Sat Dec 10, 2005 7:57 pm
by Krazy
Krazy wrote:I use clanservers as a server provider and they do not give you a mySQL datebase so what you are trying to do is impossible with them. Either use sqlite or vault saving.
Did you read what I said? If you want to save xp via mySQL you are going to have to find a new server provider, buy a dedicated server, or co-location a server.

Posted: Sun Dec 11, 2005 4:52 pm
by Liquidz
Im having the exact same problem man i cant get my xp to save everything is fine but that :(

Posted: Tue Dec 27, 2005 11:32 pm
by Scorpio
just had to post saying WOW, saint dude ur insane....if ur ever in need of a clan ill have a spot open for u LOL, we got a war3 server and stuff if ur ever in need of a clan ANYTIME lol, i watched ur video's there pretty insane bro pretty insane :lol: