At last, some measure of success.

By xorlabs

Finally, I have OpenSim working with an instance of MySQL serving as the database.  I can start OpenSim in standalone mode now and log in over the network with another computer which runs the SecondLife viewer on Windows 2000 Professional.  A couple of things needed to be changed.

As for moving from the default SQLite database to MySQL, it was indeed some bad entries I made in OpenSim.ini.  The message here is just open up the file OpenSim.ini.example in a text editor and save it as OpenSim.ini.  Do this before trying to run OpenSim for the first time.  There are plenty of comments along with the settings, and if followed can be very helpful.  Now, very carefully modify this new OpenSim.ini file you have by reading down through all of the settings, and the commentary which accompanies each setting.  Be careful to comment out all the references to SQLite, and uncommenting and suitably modifying the ones which refer to MySQL.  In other words, don’t get in a hurry.

The original idea apparently was to make OpenSim as flexible as possible.  However, it looks as though all the development effort has focused around MySQL so the flexibility is really not there.  The flexibility comes in part because there are dynamic link libraries for accessing several databases, and it is necessary to reference the MySQL DLL in OpenSim.ini.  You will see the place to do this under a section marked “Storage”, and later under a section which starts with “[Standalone]“.

Be sure that you get the MySQL connection string right, properly referencing the user id and password.  You could use the same root account you got when you installed MySQL.  If you use some other account, you do have to make sure that this account has sufficient privileges to create tables.  OpenSim will do that provided you create a database for it in MySQL and give OpenSim the name of the database you create.  The documentation talks about the database being called “opensim” but you can call it anything you want.  After the first run, all the required tables will be created, and a test user will be added.  The first time you run OpenSim, you will be asked for the test user name, and you could just take the default Test User or give it another name.  The test user will have a female avatar, and hauntingly, it looks like one of my old girlfriends named Jeannie.

In short, carefully following the commentary in OpenSim.ini, and following make the change from SQLite to MySQL and you should be okay.  And by the way, if I haven’t said it emphatically enough, don’t use any database system except MySQL.  Remember, it’s free, and it is the only one with which all the OpenSim features work correctly.  Things work with SQLite, but it is not clear that it will be sufficient when you move to grid mode.

Now there is a brief mention in the OpenSim documentation that if you are running Vista, you probably ought to open a command prompt as Administrator.  There is absolutely no probably to it.  If OpenSim is running on a host which runs Vista, ABSOLUTELY START THE COMMAND PROMPT AS ADMINISTRATOR, THEN START OPENSIM!  Sorry about the shouting, but I just don’t want you to waste an afternoon as I did today getting exceptions when the HTTPListener is started, and wondering why.  This may yet torpedo any development efforts on my part though, since it looks as though I may still not be able to run OpenSim under the debugger.  The Visual Studio debugger creates a command prompt to run OpenSim, but apparently it doesn’t acquire Administrator status, even though I am the computer’s administrator.

If I get time during the coming week, after what no doubt will be another miserable week at the power company, I’ll give grid mode a try and let you know how it comes out.

Tags: ,

Leave a Reply