Page 1 of 1

MySQL Quick Questions

Posted: Mon Nov 21, 2005 4:14 am
by jinetix
Sorry, I couldn't find this in the forum search. If this has been answered already, I apologize beforehand.

Okay, I know that if the MySQL databse is located on the same machine as the game server, everything would be much faster and efficient but would that be the case if the database was located on a webserver? The webserver is located in Chicago and the game server is located in California. Will there be any glitches or lag when it comes to retrieving exp data if I use the web server option? Should I stick to the vault.ini?

Also, when I use the Vault Conversion tool on the website, I get this error.

Code: Select all

Query failed : (REPLACE INTO `war3users` SET playerid='STEAM_0:0:3658609',playername='=LNL=SkillZ' ',xp='211',race='8',skill1='0',skill2='1',skill3='0',skill4='0'; ) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '211',race='8',skill1='0',skill2='1',skill3='0',skill4='0'' at line 1 

Posted: Mon Nov 21, 2005 9:26 am
by Geesu
OK try it again, it was a bug in my code (would fail when a user had a ' in their name)

Posted: Tue Nov 22, 2005 4:43 pm
by jinetix
It worked perfectly. :)

Geesu, one more quick question about sv_daysbeforedelete. If I set it to 0, will it disable the feature (not delete xp) or does the 0 mean that it'll delete everything?

Posted: Tue Nov 22, 2005 7:07 pm
by Geesu
No it will delete everything, the auto_pruning has to be on for that cvar to do anything

Posted: Wed Nov 23, 2005 6:26 am
by jinetix
Something isn't working right. The experience on the server isn't being saved into the MySQL database but still into the vault.ini. I set mp_savexp to 1 and sv_mysql to 1 also.

mp_savexp 1
sv_mysql 1
FT_saveby 0
FT_mysql_host "205.234.243.50"
FT_mysql_user "myusername"
FT_mysql_pass "mypass"
FT_mysql_db "mydb"

I'm also running admin_sql.amxx. Why isn't it saving onto the MySQL server?

Posted: Wed Nov 23, 2005 8:50 am
by Geesu
Did you completely shut down your server? Check your amxx logs for an error message, and post what it says. If it's reading the sv_mysql correctly and it's not connecting it shoudl tell you in the logs

Posted: Fri Nov 25, 2005 4:44 am
by jinetix
I get this error for the SQL..
L 11/25/2005 - 00:00:42: [MYSQL] Invalid database handle 0

Also, this may be a little off topic but, I get run time errors for a lot of the plugins saying.. "debug not enabled!" Should I set them all to debug mode?

Posted: Fri Nov 25, 2005 9:57 am
by Geesu
Doesn't matter, up 2 u... Also, that means its not connecting properly, wait til 2.2.9 and you *should* get a more detailed error message on connect