Error @ ServerStart MySQL ?

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

Moderator: Forum Moderator

Locked
Flash76
Peon
Posts: 7
Joined: Mon Aug 15, 2005 5:58 am
Contact:

Error @ ServerStart MySQL ?

Post by Flash76 » Mon Aug 15, 2005 6:06 am

Hi all,
we have a Linux-Root Server with SuSe 9.2!
I have Installed a new Cstrike Server with WC3FT Mod.
Now i like to use MySQL for save all stats.

I have installed an apache server (apachefriends.org)
MySQL 4.1.13 on localhost

@ root:
netstat -nlpt | grep mysqld

tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 28305/mysqld

@ user:
./hlds_run -game cstrike +map de_dust +maxplayers 21 +port 27020

[AMXX] SQL error: can't connect: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'

I Edit the war3ft.cfg and sql.cfg:

// MySQL configuration
FT_mysql_host "localhost"
FT_mysql_user "root"
FT_mysql_pass "removed"
FT_mysql_db "amxx"

I have tested IP for the Server and 127.0.0.1 but the Error is the same...

Can you help please?

Thank you

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

Post by Geesu » Mon Aug 15, 2005 7:27 am

Not sure... seems to be th emysql server isn't running...

Also, you'll need the updated sql module for 4.1
No Support via PM

User avatar
ferret
Lead Warcraft 3 XP Developer
Posts: 422
Joined: Wed Jul 06, 2005 8:20 am
Location: Atlanta, GA
Contact:

Post by ferret » Mon Aug 15, 2005 7:54 am

Don't use 'localhost' as FT_mysql_host

This sometimes breaks with AMXX. Use the ip 127.0.0.1
-< www.gamehavoc.com >-

Lazarus Long: And I know you didn't because the Server Files are version 2.2.6 and the file you posted is version 2.2.5, so do as I told you above and don't ever lie to me again or help is gone!

Flash76
Peon
Posts: 7
Joined: Mon Aug 15, 2005 5:58 am
Contact:

Post by Flash76 » Mon Aug 15, 2005 8:37 am

When i use IP 127.0.0.1 in cfg:

[AMXX] SQL error: can't connect: 'Client does not support authentication protocol requested by server; consider upgrading MySQL client'

But its the newest version of mysql

:?

User avatar
ferret
Lead Warcraft 3 XP Developer
Posts: 422
Joined: Wed Jul 06, 2005 8:20 am
Location: Atlanta, GA
Contact:

Post by ferret » Mon Aug 15, 2005 8:48 am

Correct, its the newest version of MySQL. MySQL Server is telling you that the MySQL Client code being used by AMXX is too old.

This isn't your server's fault, its AMXX's fault. You DID connect though, unlike when using localhost, MySQL just kicked you out.

Are you using the new AMXX 1.5?
-< www.gamehavoc.com >-

Lazarus Long: And I know you didn't because the Server Files are version 2.2.6 and the file you posted is version 2.2.5, so do as I told you above and don't ever lie to me again or help is gone!

Flash76
Peon
Posts: 7
Joined: Mon Aug 15, 2005 5:58 am
Contact:

Post by Flash76 » Mon Aug 15, 2005 8:51 am

Yes.. I use AMXX 1.5

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

Post by Geesu » Mon Aug 15, 2005 8:52 am

ahhhh.... yes u need new mysql module :P

If you're using amxx 1.50:
http://prdownloads.sourceforge.net/amxm ... s-1.50.zip

1.01:
http://www.amxmodx.org/forums/viewtopic.php?t=10421
No Support via PM

Flash76
Peon
Posts: 7
Joined: Mon Aug 15, 2005 5:58 am
Contact:

Post by Flash76 » Mon Aug 15, 2005 9:10 am

I use the first link 1.50 Modules:

scandir failed:/home/usr/server/pubwc3/./platform/SAVE
L 08/15/2005 - 17:11:05: -------- Mapchange --------
L 08/15/2005 - 17:11:05: [AMXX] Zlib error encountered: -3(109656)
L 08/15/2005 - 17:11:05: [AMXX] Internal error: Decompress (plugin "warcraft3FT.amxx")
[AMXX] Loaded 1 admin from file

Executing AMX Mod X Configuration File
Scrolling message displaying frequency: 10:00 minutes
Executing AMX Mod X Configuration File
Scrolling message displaying frequency: 10:00 minutes
./hlds_run: line 342: 30553 Speicherzugriffsfehler (core dumped) $HL_CMD
Cannot access memory at address 0x4001738c
debug.cmds:1: Error in sourced command file:
Cannot access memory at address 0xbfffdb8c
email debug.log to [email protected]
Mo Aug 15 17:11:10 CEST 2005: Server restart in 10 seconds

User avatar
LeafCutter
Peon
Posts: 8
Joined: Sun Aug 14, 2005 3:16 pm
Location: South Oxfordshire, England

Post by LeafCutter » Mon Aug 15, 2005 9:55 am

Flash76 wrote:When i use IP 127.0.0.1 in cfg:

[AMXX] SQL error: can't connect: 'Client does not support authentication protocol requested by server; consider upgrading MySQL client'

But its the newest version of mysql

:?
I've seen this error message before and to resolve it I reset the password for the account used to access the Warcraft database.

In the MySQL console I ran the following:-

SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

Let me know if it works...

LeafCutter

Flash76
Peon
Posts: 7
Joined: Mon Aug 15, 2005 5:58 am
Contact:

Post by Flash76 » Mon Aug 15, 2005 10:51 am

I will try these...

But now i learn first: How to open a myscl console ^^

When its done, i write here :)

Thx to all

Flash76
Peon
Posts: 7
Joined: Mon Aug 15, 2005 5:58 am
Contact:

Post by Flash76 » Mon Aug 15, 2005 11:13 am

Yeaaaaaaaah ^^

It works :)

I have start the Server and now:

[WAR3FT] Connection to MySQL Database successful (1)

Big Thx to all :)

User avatar
Lazarus Long
Lead PITA SOB
Posts: 618
Joined: Tue Jul 05, 2005 9:24 pm

Post by Lazarus Long » Mon Aug 15, 2005 12:08 pm

Hello, everybody:

Although the problem is solved, let me sum it up for future users:
  • The MySQL modules that come with AMX Mod X are built using a library compatible with MySQL version 4.0.x
  • The MySQL modules that come in the SQLModules extra package are built using a library compatible with MySQL version 4.1.x
  • The password encoding scheme has changed from MySQL 4.0.x to 4.1.x
The solution for it is to either force the usage of the old password encoding scheme using the default MySQL modules or install the SQLModules extra package and use the newer encoding scheme.

To use the old password encoding scheme:
  • Edit the server configuration file (either my.ini or my.cnf depending of your platform) and make sure you have "old_passwords = 1" set in the [mysqld] section
  • Convert all your users passwords using (as indicated above by LeafCutter) the following SQL statement in a MySQL interactive shell "SET PASSWORD FOR '<user>'@'<host>' = OLD_PASSWORD('<password>') ;"
To use the new password encoding scheme:
  • Install the AMX Mod X SQLModules extra package
  • Edit the server configuration file (either my.ini or my.cnf depending of your platform) and make sure you have "old_passwords = 0" set in the [mysqld] section
  • Convert all your users passwords using the following SQL statement in a MySQL interactive shell "SET PASSWORD FOR '<user>'@'<host>' = PASSWORD('<password>') ;"
When to use each approach:
  • If you are upgrading from a previous (4.0.x) version or you are using the MySQL server for other functions than serving AMX Mod X and Warcraft 3 FT for wich you might be using a program built against an older MySQL client library, stick with the old password encoding scheme
  • If you are doing a fresh install or you are using the MySQL server only for AMX Mod X and Warcraft 3 FT or you are absolutelly sure all the applications you might have accessing your database server are using the new MySQL client library go for the new password encoding scheme
On a side note since it is an unrelated problem, under GNU Linux always prefer to use IP addresses rather than DNS, since the resolver built in the MySQL client library is prone to failures, for instance the usage of localhost depends on a cannonical entry as a real name (not an alias) in "/etc/hosts", hence the failure above.

I hope this helps somebody in the future,


EDIT - The damn spellchecker keeps letting typos pass by, I would change it if it wasn't attached to my neck
Last edited by Lazarus Long on Tue Aug 16, 2005 3:33 am, edited 2 times in total.
Lazarus

Flash76
Peon
Posts: 7
Joined: Mon Aug 15, 2005 5:58 am
Contact:

Post by Flash76 » Mon Aug 15, 2005 12:36 pm

Great!

But i have a question again:

In the Howto i read this

Code: Select all

awk '{ if (/;|#|^ *$|\/\//) next ; if (NF != 14) next ; printf "INSERT INTO war3users (playerid, playername, xp, race, skill1, skill2, skill3, skill4, time) VALUES ( \x27%s\x27, \x27%s\x27, \x27%s\x27, \x27%s\x27, \x27%s\x27, \x27%s\x27, \x27%s\x27, \x27%s\x27, \x27%s-%s-%s %s:%s:%s\x27 );\n", substr($(NF-13), 0 , length($(NF-13))-2), $(NF-5), $(NF-11), $(NF-10), $(NF-9), $(NF-8), $(NF-7), $(NF-6), strftime("%Y"), $(NF-3), $(NF-2), $(NF-1), $(NF), "00" }' <../data/vault.ini |mysql -u amx -p<amx user password> amx
Where i must enter this?

Thx

User avatar
Lazarus Long
Lead PITA SOB
Posts: 618
Joined: Tue Jul 05, 2005 9:24 pm

Post by Lazarus Long » Tue Aug 16, 2005 3:09 am

Flash76:

From the line exactly above that code snippet:
Lazarus Long wrote:and issue the following command in a shell (run this in the AMX Mod X configs directory - you already should be there - and note that there is no space between -p and the password)
I hope this helps,
Lazarus

iwatchyou0
Peon
Posts: 28
Joined: Sun Aug 21, 2005 1:29 am

Post by iwatchyou0 » Sun Aug 21, 2005 8:12 pm

i did what you said and got this still =/.

Code: Select all

L 08/21/2005 - 19:09:31: [AMXX] [MYSQL] Invalid database handle -1
L 08/21/2005 - 19:09:31: [AMXX] Displaying call trace (plugin "cstrike\addons\amxmodx\plugins\warcraft3FT.amxx")
L 08/21/2005 - 19:09:31: [AMXX]    [0] XP.inl::XP_Set_DBI (line 565)
L 08/21/2005 - 19:09:31: [AMXX]    [1] war3ft.inl::WAR3_Set_Variables (line 1228)

User avatar
Lazarus Long
Lead PITA SOB
Posts: 618
Joined: Tue Jul 05, 2005 9:24 pm

Post by Lazarus Long » Sun Aug 21, 2005 10:16 pm

Have a look at Geesu's post regarding this.
Lazarus

Locked