View previous topic :: View next topic |
Author |
Message |
william_hunter
Joined: 31 Jan 2007 Posts: 149
|
Posted: Tue Jul 08, 2008 15:32 Post subject: Setting up database pwobjectdata on Ubuntu server? |
|
|
Hey all, I am having a problem with a database storing persistent item information for Rami_Ahmed's persistent player owned shop. I thought I had the database set up properly, but it appears I do not.
I am running Ubuntu server 7.06, MySQL 5 and have been running NWNx since I started the server, two years ago (I didn't have it on Ubuntu until a year ago, but..) and have had a few problems with the database but I have always been able to hack it out. This one has me stumped. Someone want to give me a hand? Maybe if you could post the SQL code for creating the tables I would need for that db? I looked in the aps_demo mod, and all I find in there is sqlite information. Is it different?
Please forgive my noobishness. I had to learn Linux, now I am working on SQL..its a slow process when one has limited time _________________ The Realm of Tharagon NWN PW |
|
Back to top |
|
|
Fireboar
Joined: 17 Feb 2008 Posts: 323
|
Posted: Tue Jul 08, 2008 18:43 Post subject: |
|
|
Do you have nwnx_odmbc in the latest version? If not, storing campaign objects is impossible. That's ODMBC and not the ODBC plugin that comes with nwnx. Not sure which you have? One of them the source is in the folder "db", the other is "odmbc".
If you don't have odmbc, the easiest way to get it and any other Linux plugins is using nwnx_easy (link in my sig). It's geared especially towards Debian and Ubuntu servers.
If you do, this might be helpful:
Code: | CREATE TABLE containers (
charname text,
player text,
item text,
count int(64) default NULL,
IDENTIFIED int(64) default NULL
) TYPE=MyISAM; |
It might need changing for you though... what exactly are you trying to do? |
|
Back to top |
|
|
william_hunter
Joined: 31 Jan 2007 Posts: 149
|
Posted: Tue Jul 08, 2008 18:54 Post subject: |
|
|
I do not have ODMBC. This could be one good reason for this not working. I was sure I had it installed. Now I will do that. _________________ The Realm of Tharagon NWN PW |
|
Back to top |
|
|
william_hunter
Joined: 31 Jan 2007 Posts: 149
|
Posted: Tue Jul 08, 2008 19:16 Post subject: |
|
|
where can I get just the most recent nwnx_odmbc plugin? I cannot seem to find it. _________________ The Realm of Tharagon NWN PW |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
|
Back to top |
|
|
william_hunter
Joined: 31 Jan 2007 Posts: 149
|
Posted: Tue Jul 08, 2008 21:00 Post subject: |
|
|
Ah, thanks. I didn't think that was a working version, so I did not use it. _________________ The Realm of Tharagon NWN PW |
|
Back to top |
|
|
william_hunter
Joined: 31 Jan 2007 Posts: 149
|
Posted: Tue Jul 08, 2008 21:09 Post subject: |
|
|
Ok, so I DLed that plugin and put it in place, and now I am getting a message on server startup:
Error: ODBC: Oncreate() Failed
Then a bunch of plugins load properly, then the mod starts as it should, then:
LIBRARY ODBC!SPACER does not exist
LIBRARY ODBC!SPACER does not exist
this one goes 6 times, then:
LIBRARY ODBC!EXEC does not exist
LIBRARY ODBC!FETCH does not exist
Repeated to infinity _________________ The Realm of Tharagon NWN PW |
|
Back to top |
|
|
william_hunter
Joined: 31 Jan 2007 Posts: 149
|
Posted: Tue Jul 08, 2008 22:21 Post subject: |
|
|
Additional information:
nwnx_odmbc.txt reports:
o Critical Error: Datasource must be either MySQL or SQLite
o Shutdown. _________________ The Realm of Tharagon NWN PW |
|
Back to top |
|
|
william_hunter
Joined: 31 Jan 2007 Posts: 149
|
Posted: Wed Jul 09, 2008 1:45 Post subject: |
|
|
OK, this is a little maddening..I have gone ahead and updated the plugins on the server, because I found them mostly all to be outdated. I am guessing that this is a good thing for various reasons. Now I still get the startup error, and I still have no pwobjdata access. _________________ The Realm of Tharagon NWN PW |
|
Back to top |
|
|
william_hunter
Joined: 31 Jan 2007 Posts: 149
|
Posted: Wed Jul 09, 2008 1:59 Post subject: |
|
|
I browsed around and tried some of the fixes others have made work, but I am having no success. I am stumped, I'll admit it. _________________ The Realm of Tharagon NWN PW |
|
Back to top |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Wed Jul 09, 2008 2:25 Post subject: |
|
|
Code: | SQLExecDirect("CREATE TABLE pwobjdata (" +
"player varchar(64) default NULL," +
"tag varchar(64) default NULL," +
"name varchar(64) default NULL," +
"val BLOB," +
"expire int(11) default NULL," +
"last timestamp(14) NOT NULL," +
"KEY idx (player,tag,name)" +
") TYPE=MyISAM;"); |
Should be what you're looking for...
LIBRARY ODBC!SPACER does not exist
would tend to indicate that SQLInit() has not been executed OnLoad() of module...which in turn indicates and older ODBC plugin.
Critical Error: Datasource must be either MySQL or SQLite
means you need one of the above set in the nwnx.ini file (source=...)
Code: | Use these five settings for MySQL connections
source = mysql
server = localhost
user = nwn
pwd = nwn
db = nwn |
Cheers
Gryphyn |
|
Back to top |
|
|
william_hunter
Joined: 31 Jan 2007 Posts: 149
|
Posted: Wed Jul 09, 2008 2:35 Post subject: |
|
|
source eh? That is missing from my nwnx.ini file. Interesting that I have never noticed this before in a year and half of running this server, isnt it?
I've managed to make the table in phpmyadmin, that was a little maddening as well, but thats simply because I am an idiot and kept making typos. I don't have exactly this table structure, but I think I will be changing it now, because I see some things I have set differently.
I have the newest odmbc plugin from virusman, now. Is there something I have to do to install it properly that I have missed?
I do however, have SQLInit called in my modload script, I have just confirmed this. _________________ The Realm of Tharagon NWN PW |
|
Back to top |
|
|
william_hunter
Joined: 31 Jan 2007 Posts: 149
|
Posted: Wed Jul 09, 2008 2:58 Post subject: |
|
|
Here is my nwnx.ini file:
Code: |
[ODBC2]
; Log file
MaxLogSize=512 ; in KByte
LogLevel=1 ; 0=nothing, 1=only errors, 2=everything
[Database]
source=mysql
server=localhost #name of the database server
user=XXXX #username to access db
pass=XXXX #password for username
db=nwn #database to connect to
hookscorco=true
[Debug]
debuglevel=1 #Set to 1 or higher to output successively
# # verbose debug information
[LogDir]
logdir=logs.0 #Set to the relative root of the log directory.
[CHAT]
chat_script=fky_chat # default = chat_script ;)
server_script=fky_chat_srv # without extension!
processnpc=1 # switch NPC speech processing on/off
ignore_silent=0 # disable processing of silent talk/shout messages
debuglevel=1
[EVENTS]
event_script=fky_chat_event
[RESETPLUGIN]
disabled=n
#[FUNCTIONS}
#disabled=n
#debuglevel=1
|
_________________ The Realm of Tharagon NWN PW |
|
Back to top |
|
|
william_hunter
Joined: 31 Jan 2007 Posts: 149
|
Posted: Wed Jul 09, 2008 3:18 Post subject: |
|
|
And now when I try to log into the mod, it crashes. -sigh- I couldn't leave well enough alone..I think its the chat plugin that needs to be updated now, as I have updated nwnx.so and odbc.so (odmbc). _________________ The Realm of Tharagon NWN PW |
|
Back to top |
|
|
|