logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
remote mysql connection

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Database related
View previous topic :: View next topic  
Author Message
Ne0nx3r0



Joined: 29 Nov 2006
Posts: 36

PostPosted: Thu Jan 01, 2009 9:22    Post subject: remote mysql connection Reply with quote

Maybe this is answered elsewhere, but I couldn't seem to find it >.>

Can NWNX2(for nwn1) connect to a remote mysql database? I know the example shows localhost but will it work with remote IPs/hostnames?
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Thu Jan 01, 2009 11:26    Post subject: Reply with quote

Yes, just set the host in NWNX.ini. It may lag the server horribly, though, unless the DB is on a LAN.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
terror2001



Joined: 11 Oct 2010
Posts: 7

PostPosted: Mon Oct 11, 2010 21:56    Post subject: Reply with quote

Is there an INI config setting to change the port # that NWNX uses to connect to the MySQL DB?

Or is there another method to change the port used other than the default 3306?
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Mon Oct 11, 2010 22:01    Post subject: Reply with quote

Hmm, there is not! That's an oversight. I'll commit a fix, but as a temporary solution, you can change the first 0 on line 47 of mysql.cpp (in the latest Win32 SVN revision) to the desired port number and recompile.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
terror2001



Joined: 11 Oct 2010
Posts: 7

PostPosted: Mon Oct 11, 2010 22:21    Post subject: Reply with quote

I don't suppose that can be added to NWNX2?
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Mon Oct 11, 2010 22:26    Post subject: Reply with quote

Easy enough. Done; grab nwnx_odbc from the link in my sig. The option is port=1234 in NWNX.ini.

Linux already supported this, BTW -- just Win32 was missing it.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
terror2001



Joined: 11 Oct 2010
Posts: 7

PostPosted: Tue Oct 12, 2010 1:28    Post subject: Reply with quote

Cool, I will give that a whirl. Thanks.
Back to top
View user's profile Send private message
terror2001



Joined: 11 Oct 2010
Posts: 7

PostPosted: Tue Oct 12, 2010 1:38    Post subject: Reply with quote

Hmm, it didn't seem to work. The nwnx_odbc.dll file version I got from your site is 0.9.2.5, 1,820,160 bytes.

My ini configs are these:
Code:
source = mysql
server = localhost
user   = root
pwd    = nwn
db     = nwn
port   = 3307


Navicat works with this server/user info.
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Tue Oct 12, 2010 3:28    Post subject: Reply with quote

That's the right file size, and it's definitely working for me, so logs are the next step. What's in logs.0/nwnx_odbc.txt?
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
terror2001



Joined: 11 Oct 2010
Posts: 7

PostPosted: Tue Oct 12, 2010 7:02    Post subject: Reply with quote

nwnx.txt
Code:
NWN Extender V.2.6.1
(c) 2005 by Ingmar Stieger (Papillon) and Jeroen Broekhuizen
visit us at http://www.nwnx.org

* Loading plugins...
* Plugin chat is loaded.
* Plugin fixes is loaded.
* Plugin functions is loaded.
* Plugin hashset is loaded.
* Plugin leto is loaded.
* An error occured during OnCreate of odbc
* Plugin profiler is loaded.
* Plugin resetplugin is loaded.
* Plugin sortset is loaded.
* Plugin vaultster is loaded.


nwnx_odbc.txt
Code:
NWNX ODBC2 plugin V.0.9.2.5
(c) 2005 by Ingmar Stieger (Papillon) and Jeroen Broekhuizen
visit us at http://www.nwnx.org

o Logfile maximum size limit is: 524288 bytes
o Log level: Everything will be logged.
o Using MySQL connection.
o Hooking SCO....hooked at 5d5830
o Hooking RCO....hooked at 5d5710
! Error while connecting to database: Can't connect to MySQL server on 'localhost' (10061)


I'm running MySQL 5.1.48, and ODBC 5.1.6
Back to top
View user's profile Send private message
terror2001



Joined: 11 Oct 2010
Posts: 7

PostPosted: Wed Oct 13, 2010 17:37    Post subject: Reply with quote

Are these logs of any use?
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Thu Oct 14, 2010 11:38    Post subject: Reply with quote

They imply that there is no mysql server running at localhost listening at the given port. To check, try in a command prompt (you're using Windows, so it's...)

Code:
tasklist


This should give you a list of processes - look for mysql on that list. If you don't find it, then MySQL isn't running. Otherwise, with its process ID (PID), run the following command (replacing 7200 with the actual PID):

Code:
netstat -ano | findstr 7200


The LISTENING row(s) should tell you what port(s) mysql is listening on.
Back to top
View user's profile Send private message
terror2001



Joined: 11 Oct 2010
Posts: 7

PostPosted: Thu Oct 14, 2010 17:34    Post subject: Reply with quote

I know it is running when I tried nwnx because I stop and start MySQL manually when I am going to test, and Navicat can connect when it is running.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Database related All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group