Just a little question involving MYSQL

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

Moderator: Forum Moderator

Locked
stu
Peon
Posts: 4
Joined: Sat Sep 10, 2005 1:30 pm

Just a little question involving MYSQL

Post by stu » Tue Sep 13, 2005 4:26 am

I really didn't feel the need to post my specs etc, so i'm just wondering, Is it possible to connect to a MySQL Database from a different Server?

eg. My Cs Server Is Hosted On One server, i don't have access to put MySQL on that server, so I was wondering, If it was possible to connect using a Database from my Web Host?

Thanks.

Stu.

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

Post by Lazarus Long » Tue Sep 13, 2005 8:53 am

stu:

Asked and replied, read the FORUM RULES and/or use the Search.

But, for now, I'm not locking it since although implied in several messages it isn't clearly stated in none, so here goes:

To connect to a remote server you only need to replace 127.0.0.1 with your MySQL server IP or DNS name from amx_sql_host in "addons/amxmodx/configs/sql.cfg" and FT_mysql_host in "addons/amxmodx/configs/war3FT.cfg" and in the MySQL for Warcraft 3 FT simple Mini-HOWTO, provided you followed the rest of it correctly.

WARNING: Please take notice that this not always will give you the results expected. In fact it might rise the lag of your server if the MySQL server isn't close enough to avoid timeouts between it and the game server. Run a traceroute (tracert for Microsoft Windows) or a tracepath and a ping both with your MySQL server IP or DNS name as parameter from your gameserver and check the latency for a general idea.

(I wrote a much more detailed explanation once in the old forums with the intention of adding it later to the Mini-HOWTO, but I don't recall the post subject)

I hope this helps.
Lazarus

stu
Peon
Posts: 4
Joined: Sat Sep 10, 2005 1:30 pm

Post by stu » Tue Sep 13, 2005 1:08 pm

Hi

Thanks mate, sorry for not following the rules, i just didnt feel it was appropriate to post all my modules, plugins, etc.

Also, i didn't put it in the sql.cfg, only the war3ft.cfg, but it still works? I decided on using www.freesql.org, since my host doesnt allow incoming connections.

It seems to be working OK, but at the start of a new map / new connection, i have to type changerace to select race, since it automatically keeps me on my previous race? :\

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

Post by Lazarus Long » Tue Sep 13, 2005 1:18 pm

stu wrote:Thanks mate, sorry for not following the rules, i just didnt feel it was appropriate to post all my modules, plugins, etc.
That is for server problems, you made a question you didn't have a problem, so no harm there.
stu wrote:Also, i didn't put it in the sql.cfg, only the war3ft.cfg, but it still works?
Yes for Warcraft 3 FT, but if you want admins stored in a SQL database you'll have to do sql.cfg too.
stu wrote:It seems to be working OK, but at the start of a new map / new connection, i have to type changerace to select race, since it automatically keeps me on my previous race? :\
Beats me, this has nothing to do with SQL (or at least I can't see the connection), lets see what Geesu has to say about that.

Regards,
Lazarus

stu
Peon
Posts: 4
Joined: Sat Sep 10, 2005 1:30 pm

Post by stu » Tue Sep 13, 2005 1:52 pm

Right so i'll add it to the sql.cfg in a sec, and thanks for your help mate! :)

Locked