can't connect to mySQL database?!

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

Moderator: Forum Moderator

Post Reply
furious197
Peon
Posts: 10
Joined: Wed Apr 25, 2007 12:19 pm

can't connect to mySQL database?!

Post by furious197 » Wed Nov 14, 2007 7:49 am

today i have update from WC3FT 2.3.2 to WC3FT 3.0 RC8. Now i have the problem that the server can't connect to mysql database.

I have this line in my error_log

L 11/14/2007 - 14:48:04: ** Map 'de_dust' started
L 11/14/2007 - 14:48:04: ** Plugin version: '3.0 RC8'
L 11/14/2007 - 14:48:06: [MYSQLX] Database Connection Failed: [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

MY wc3FT.cfg


// Warcraft 3 Frozen Throne Configuration File


// Saving Options

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 0 // 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 "localhost" // Host Name
wc3_sql_dbuser "****" // User Name
wc3_sql_dbpass "*******" // Password
wc3_sql_dbname "sotd" // Database Name


// Admin Options

wc3_admin_flag "m" // Admin flag required to give/take XP (default is m)


// Experience Options

wc3_xp_multiplier 1.0 // set the level required to gain a level as a multiple (default 1.0)
wc3_xp_weap_multiplier 1 // Award XP based on the weapon used (default is 1)
wc3_min_players 2 // Minimum amount of players needed b4 awarding XP (default is 2)
wc3_ignore_bots 0 // Should you ignore bots when calculating the minimum players required to gain xp? (default is 0)
wc3_xp_auto_average 0 // With this option set to 1, the joining players will receive the average amount of XP that all of the players have (SHORT TERM XP ONLY, default is 0)
wc3_show_objectives 1 // If enabled, will display message in chat to show XP they gain for completing certain objectives (default is 1)
wc3_show_kill_obj 0 // Shows how much XP you gain for killing someone (each kill, default is 0)
wc3_xp_radius 750 // Radius to give XP to teammates near where the special objective is completed (rescued hosties, bomb planted, killed vip, vip escaped, default is 750)


// Game Play Enhancements

wc3_races 8 // Number of races (if races are less than 5, the second shopmenu will be disabled (4 is standard war3), default is 8)
wc3_grenade_protection 0 // Only 1 HE grenade will be allowed for purchase per round (default is 0)
wc3_spec_position 0 // 0 is for left, 1 is for right (where to put the information for those spectating, default is 0)
wc3_buy_zone 0 // Restrict purchasing shopmenu items to within the buyzone? (default is 0)
wc3_buy_time 0 // Restrict purchasing shopmenu items to within the buytime? (default is 0)
wc3_buy_dead 1 // Allow users to purchause items when dead? (default is 1)
wc3_show_player 1 // Show teammate and enemy information in the center of the screen when they are on target? (not for DOD, default is 1)
wc3_query_client 1 // Check user's cl_minmodel cvar every second (default is 1)
wc3_cheats 0 // Enable cheats for wc3? (default is 0)
wc3_psychostats 1 // Print psychostats information to log files for wc3 abilities? (default is 0)
wc3_start_level 0 // What level should all players start at when joining? (default is 0)

// Icon Options (displayed above player's head)

wc3_race_icon 1 // Allow users to type /icons to show player icons above the player (default is 1)
wc3_level_icon 1 // Allow users to type /icons to see player levels above the player (default is 1)


// Chameleon Race Configuration Options - see _chameleon.txt for more information

wc3_cham_random 1 // Should the 9th race have random skills each round?, if so the next 4 option are irrelevant (default is 1)
wc3_cham_skill1 14 // What skill ID for skill 1?
wc3_cham_skill2 0 // What skill ID for skill 2?
wc3_cham_skill3 6 // What skill ID for skill 3?
wc3_cham_ultimate 7 // What skill ID for the user's ultimate?
wc3_cham_passive 20 // What skill ID for the user's passive skill?


// Skill and Ultimate configurations

wc3_ult_delay 15.0 // Amount of time (in seconds) to delay the ultimates at the start of each round (default is 15.0)
wc3_ult_cooldown 35.0 // Cooldown of all ultimates (default is 35.0)
wc3_blink_protection 1 // slays people who abuse blink on some maps (skywalking, map exploiting, default is 1)
wc3_blink_dizziness 0 // What type of diziness? (0 is flashbang effect, 1 is fading blue screen, default is 0)
wc3_entangle_drop 0 // Should the player's primary weapon be dropped when they are entangled? (default is 0)


// Item configurations

wc3_glove_timer 10 // Interval between receiving a new grenade with the Flaming Gloves of Warmth (default is 10)
wc3_glove_orc_damage 0 // When using gloves, should orcs be given the critical dmg? (Default is 0)
wc3_boots 0.10 // Percentage increase given by boots (.10 = 10%, default is 0.10)
wc3_claw 6 // Damage done by Claws of Attack (default is 6)
wc3_health 15 // Health bonus given for periapt of health (default is 15)
wc3_frost 125.0 // Speed of victim when attacked with Orb of Frost (default is 125.0)
wc3_mask 0.3 // Percentage of life gained back by mask of death (default is 0.3)
wc3_cloak 150 // Invisibility given with cloak, lower is more invisible (default is 150)
wc3_sock 0.5 // Gravity level for Sock of the Feather (default is 0.5)
wc3_tome 50 // XP given for purchasing tome of experience (default is 50)


// Bot Configuration Options

wc3_bot_buy_item 0.33 // Chance of a bot buying a shopmenu item at the beginning of the round (default is 0.33)


// DOD Options

wc3_dod_start_money 800 // Starting money for dod




--- Please enter the following information for support ---
War3ft Version: 3.0RC8
Amxmodx Version: 1.8.0.3660
Metamod Version: 1.19
amxx list:
amxx modules:
meta list:
description stat pend file vers src load unlod
[ 1] AMX Mod X RUN - amxmodx_mm_i386. v1.8.0.3 ini Start ANY
[ 2] SBSRV RUN - sbsrv_mm_i386.so v3.5 ini Start Never
[ 3] HLGuard RUN - hlguard_mm_i686. v1.8 ini Chlvl Chlvl
[ 4] MySQL RUN - mysql_amxx_i386. v1.8.0.3 pl1 ANY ANY
[ 5] Fun RUN - fun_amxx_i386.so v1.8.0.3 pl1 ANY ANY
[ 6] Engine RUN - engine_amxx_i386 v1.8.0.3 pl1 ANY ANY
[ 7] FakeMeta RUN - fakemeta_amxx_i3 v1.8.0.3 pl1 ANY ANY
[ 8] CStrike RUN - cstrike_amxx_i38 v1.8.0.3 pl1 ANY ANY
[ 9] CSX RUN - csx_amxx_i386.so v1.8.0.3 pl1 ANY ANY
[10] SQLite RUN - sqlite_amxx_i386 v1.8.0.3 pl1 ANY ANY
10 plugins, 10 running♦

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

Post by YamiKaitou » Wed Nov 14, 2007 10:02 am

Is the MySQL server running on the same comp as the game server is running on?
Image

No support via PM or Email

furious197
Peon
Posts: 10
Joined: Wed Apr 25, 2007 12:19 pm

Post by furious197 » Wed Nov 14, 2007 1:01 pm

yes on the same server

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

Post by YamiKaitou » Wed Nov 14, 2007 1:16 pm

And it connected before when using 2.3.2? And, none of the details have been changed? Can any other plugin connect to the MySQL server? Cause, if not, this isn't a wc3ft error (it isn't anyways)
Image

No support via PM or Email

furious197
Peon
Posts: 10
Joined: Wed Apr 25, 2007 12:19 pm

Post by furious197 » Wed Nov 14, 2007 1:18 pm

yes on version 2.3.2 works it and other programms can connect to MySQL e.g. our website

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

Post by YamiKaitou » Wed Nov 14, 2007 1:34 pm

Can other AMXModX plugins connect to SQL? I still, and will, doubt that this has anything to do with WC3FT as it is saying AMXX can't connect to the server. What I probably would do is bring it up with the AmxX devs. They might be able to tell you why it is doing that
Image

No support via PM or Email

furious197
Peon
Posts: 10
Joined: Wed Apr 25, 2007 12:19 pm

Post by furious197 » Wed Nov 14, 2007 1:38 pm

i thing amxx can connect. where can i see it?

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

Post by YamiKaitou » Wed Nov 14, 2007 2:08 pm

Find another plugin that uses a SQL database and run that plugin to see if it can connect to the database. If it can't, something is wrong with your server or database. If it can, idk
Image

No support via PM or Email

lovetide
Peon
Posts: 2
Joined: Thu Feb 16, 2006 7:10 pm
Location: China.ShenZhen 中国·深圳

Post by lovetide » Sun Feb 10, 2008 4:09 pm

I'm using War3FT 3.0 RC9, I encountered the same problem.

NOTE: the admin_sql.amxx works ok under the same environment.

I'm running HLDS on CentOS 5.1, I installed MySQL 5.1.22-rc (downloaded from official mysql website http://dev.mysql.com),

MySQL does not create a .sock file under /tmp, the .sock file is located at /var/lib/mysql

Code: Select all

[root@tide-centos war3ft]# ll /var/lib/mysql/ /tmp/
/tmp/:
总计 12
drwx------ 2 root root 4096 02-06 14:27 gconfd-root
srwxr-xr-x 1 root root    0 02-06 14:23 mapping-root
srw------- 1 root root    0 02-06 14:23 scim-panel-socket:0-root
-rw-r--r-- 1 root root  333 02-06 14:23 sealert.log
-rw-r--r-- 1 root root  586 02-06 03:57 tmpY_bcm0xorg.config

/var/lib/mysql/:
总计 20544
drwxr-xr-x 2 mysql mysql     4096 02-11 01:32 cs
-rw-rw---- 1 mysql mysql 10485760 02-11 00:14 ibdata1
-rw-rw---- 1 mysql mysql  5242880 02-11 00:14 ib_logfile0
-rw-rw---- 1 mysql mysql  5242880 02-10 23:50 ib_logfile1
drwx--x--x 2 mysql mysql     4096 02-10 23:50 mysql
srwxrwxrwx 1 mysql mysql        0 02-11 00:30 mysql.sock
drwxr-xr-x 2 mysql mysql     4096 02-10 23:50 test
-rw-rw---- 1 mysql root      5922 02-11 00:30 tide-centos.lovetide.cn.err
-rw-rw---- 1 mysql mysql        5 02-11 00:30 tide-centos.lovetide.cn.pid
[root@tide-centos war3ft]#
a diabetes patient
山东人在深圳

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

Post by YamiKaitou » Sun Feb 10, 2008 10:40 pm

You will need to create a sock file in the tmp folder then. I knew at one point how to do it, but I can't remember how anymore.
Image

No support via PM or Email

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

Post by Geesu » Wed Feb 13, 2008 11:30 am

Yea do a symbolic link:

ln -s I believe
No Support via PM

lovetide
Peon
Posts: 2
Joined: Thu Feb 16, 2006 7:10 pm
Location: China.ShenZhen &#20013;&#22269;·&#28145;&#22323;

Post by lovetide » Thu Feb 14, 2008 4:44 am

Geesu wrote:Yea do a symbolic link:

ln -s I believe
ya, I created a soft symbolic link, it works now, but I still have that question : why admin_sql.amxx works ok while war3ft 3.0 can't connect to database?

and a little problem:
it seems war3ft 3.0 rc9 does not transfer the player skills from older 'war3users' table, it only transfered the wc3_player, wc3_player_xp, wc3_player_race... the players need to manually re-select their skills.

Code: Select all

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

Code: Select all

[root@tide-centos ~]# ll /var/lib/mysql/ /tmp/
/tmp/:
总计 12
drwx------ 2 root root 4096 02-06 14:27 gconfd-root
srwxr-xr-x 1 root root    0 02-06 14:23 mapping-root
lrwxrwxrwx 1 root root   25 02-11 13:02 mysql.sock -> /var/lib/mysql/mysql.sock  <---------- Here -------------
srw------- 1 root root    0 02-06 14:23 scim-panel-socket:0-root
-rw-r--r-- 1 root root  333 02-06 14:23 sealert.log
-rw-r--r-- 1 root root  586 02-06 03:57 tmpY_bcm0xorg.config

/var/lib/mysql/:
总计 20548
drwxr-xr-x 2 mysql mysql     4096 02-11 13:50 cs
-rw-rw---- 1 mysql mysql 10485760 02-11 00:14 ibdata1
-rw-rw---- 1 mysql mysql  5242880 02-11 00:14 ib_logfile0
-rw-rw---- 1 mysql mysql  5242880 02-10 23:50 ib_logfile1
drwx--x--x 2 mysql mysql     4096 02-10 23:50 mysql
srwxrwxrwx 1 mysql mysql        0 02-14 18:28 mysql.sock
drwxr-xr-x 2 mysql mysql     4096 02-10 23:50 test
-rw-rw---- 1 mysql mysql    10866 02-14 18:28 tide-centos.lovetide.cn.err
-rw-rw---- 1 mysql mysql        5 02-14 18:28 tide-centos.lovetide.cn.pid

a diabetes patient
山东人在深圳

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

Post by YamiKaitou » Thu Feb 14, 2008 1:20 pm

lovetide wrote:
Geesu wrote:Yea do a symbolic link:

ln -s I believe
ya, I created a soft symbolic link, it works now, but I still have that question : why admin_sql.amxx works ok while war3ft 3.0 can't connect to database?
I would think it has something to do with the way AMXx is coded, not war3ft.
and a little problem:
it seems war3ft 3.0 rc9 does not transfer the player skills from older 'war3users' table, it only transfered the wc3_player, wc3_player_xp, wc3_player_race... the players need to manually re-select their skills.
Yes, is there a problem with that? It is mainly done because some of the skills have changed in 3.0
Image

No support via PM or Email

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

Post by Geesu » Fri Feb 15, 2008 8:12 am

It's the only way to do it - importing the skills would make the import take like 10 years
No Support via PM

Post Reply