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 
 
MySQL "port" and "unix_socket" params

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development
View previous topic :: View next topic  
Author Message
metamud



Joined: 30 Sep 2008
Posts: 16

PostPosted: Wed Oct 01, 2008 9:06    Post subject: MySQL "port" and "unix_socket" params Reply with quote

I'm using the odmbc plugin (because I need the scorco hooks, I'm not using the db one).

Two parameters from mysql_real_connect were still missing support in nwnx2.ini:

  • specifying a port number (if mysql server does not run on default port)
  • specifying the location of the unix socket file (when connecting to "localhost")

I implemented and tested both, and have diffs against revision 187 available.

Example of new port and socket options in nwnx2.ini:

Use this if you are running a mysqld on the same server as "nwserver" and want to specify the location of the mysql server's unix socket:
Code:
[ODBC2]
source=mysql
server=localhost
socket=/home/nwn/mysql/mysqld.sock
user=nwn
pass=<withheld>
db=NWNX


Use this if the mysql server runs on a different host and port, e.g., on port 5000 in this snippet:
Code:
[ODBC2]
source=mysql
server=somewhere.example.com
port=5000
user=nwn
pass=<withheld>
db=NWNX
Back to top
View user's profile Send private message
metamud



Joined: 30 Sep 2008
Posts: 16

PostPosted: Thu Oct 09, 2008 23:34    Post subject: Reply with quote

Ahem. File reading permission errors of the diffs file fixed. Sorry if you tried to download them and got a booboo.

Is this interesting enough for enough people to have enough motitvation to get it merged into the trunk?

Can I post the patches to the forum directly? Does no one care and can I just delete this stuff? I'm still happy with them, but no need to have this post here just for ego boosting. Very Happy
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Thu Oct 09, 2008 23:39    Post subject: Reply with quote

Thanks for the diff. It's a nice addition to the plugin.
I'm planning to merge it into the trunk, but didn't have time yet (it requires a small modification).
Btw, I downloaded the file without errors the same day you posted it.


Last edited by virusman on Thu Oct 09, 2008 23:50; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
metamud



Joined: 30 Sep 2008
Posts: 16

PostPosted: Thu Oct 09, 2008 23:48    Post subject: Reply with quote

Right. Smile I had no idea if anyone was interested at all, because I got no response so far.

If there is anything I can do to help out with the diffs, just let me know and I'll be happy to lend a hand.
Back to top
View user's profile Send private message
Mikel of Avalon



Joined: 29 Dec 2004
Posts: 72
Location: Germany

PostPosted: Fri Oct 10, 2008 9:22    Post subject: Reply with quote

Nice Addition!
Must i do the changes by myself or will there a new version released?
_________________
Mikel of Avalon

Kalandur - Die vergessene Welt
Back to top
View user's profile Send private message Visit poster's website
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sat Oct 18, 2008 0:54    Post subject: Reply with quote

The patch has been merged.
http://nwn.virusman.ru/trac/nwnx2-linux/changeset/189
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development 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