View previous topic :: View next topic |
Author |
Message |
Ne0nx3r0
Joined: 29 Nov 2006 Posts: 36
|
Posted: Thu Jan 01, 2009 9:22 Post subject: remote mysql connection |
|
|
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 |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Thu Jan 01, 2009 11:26 Post subject: |
|
|
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 |
|
|
terror2001
Joined: 11 Oct 2010 Posts: 7
|
Posted: Mon Oct 11, 2010 21:56 Post subject: |
|
|
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 |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Mon Oct 11, 2010 22:01 Post subject: |
|
|
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 |
|
|
terror2001
Joined: 11 Oct 2010 Posts: 7
|
Posted: Mon Oct 11, 2010 22:21 Post subject: |
|
|
I don't suppose that can be added to NWNX2? |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Mon Oct 11, 2010 22:26 Post subject: |
|
|
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 |
|
|
terror2001
Joined: 11 Oct 2010 Posts: 7
|
Posted: Tue Oct 12, 2010 1:28 Post subject: |
|
|
Cool, I will give that a whirl. Thanks. |
|
Back to top |
|
|
terror2001
Joined: 11 Oct 2010 Posts: 7
|
Posted: Tue Oct 12, 2010 1:38 Post subject: |
|
|
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 |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Tue Oct 12, 2010 3:28 Post subject: |
|
|
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 |
|
|
terror2001
Joined: 11 Oct 2010 Posts: 7
|
Posted: Tue Oct 12, 2010 7:02 Post subject: |
|
|
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 |
|
|
terror2001
Joined: 11 Oct 2010 Posts: 7
|
Posted: Wed Oct 13, 2010 17:37 Post subject: |
|
|
Are these logs of any use? |
|
Back to top |
|
|
Fireboar
Joined: 17 Feb 2008 Posts: 323
|
Posted: Thu Oct 14, 2010 11:38 Post subject: |
|
|
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...)
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 |
|
|
terror2001
Joined: 11 Oct 2010 Posts: 7
|
Posted: Thu Oct 14, 2010 17:34 Post subject: |
|
|
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 |
|
|
|