OpenSim – MySQL Install Guide

**** UPDATE **** – This guide is old, I suggest you check out the new updated install guide located here:

Updated – MySQL Installation Guide

********************************************************************************************

Before we get started, I have a few things you should make note of before continuing.

If you already have your OpenSim running from the previous directions, you’re running on SQLite, which has some performance issues as you’ve probably already discovered. If you have any builds at all, you’ll want to export them to the xml format before doing any of the steps below. (type help in the opensim server dos-box, and use the commands there to save your region – look for the xml specific commands.)

Because of the evolving state of the xml spec, I can’t personally guarantee that every texture and such will be on your build, but you should at the very least have all the objects in that region saved. This is the nature of software such as OpenSim, things evolve quickly! Don’t worry about it too much, though.

If you’re absolutely *not* willing to experiment with your latest project in progress – backup the ENTIRE opensim directory after exporting your region’s objects to xml files. Just make sure the backup directory isn’t in a location where your original directory is – or opensim may have some problems. I recommend stuffing your backup under a folder called ‘Backups’ or something more specific.

Ready? Ok – lets go!

We’ll need to install MySQL server for windows first.

Get MySQL for windows here:

****THIS GUIDE IS OUTDATED, LINKS HAVE BEEN REDACTED.****

http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.51b-win32.zip/from/pick#mirrors

If you’re coming in from the main site, you may have to click on “No thanks, just take me to the downloads!” to see the mirror list.

After you pick a mirror, (one of the http or ftp links next to the entry) you’ll see a download dialog like this:

This will take a bit, since the download is about 46 MB.

Once it is done, unzip the installer .exe and launch it.

This should display the setup wizard for MySQL.

Now you’ll see some setup types. Just stay with the selected ‘typical’ setup type, and hit ‘Next’.

Select Install, accepting the current settings.

Installation will start, and you’ll see a progress bar.

A new window will be displayed, presenting some subscription options, just hit ‘Next’ for now.

There will be a window about monitoring and advisory service, just select ‘Next’.

The setup wizard will now show a completed window, leave ‘configure the MySQL server now’ checked and select ‘Finish’.

You’ll now be greeted with the MySQL Server Instance Configuration Wizard. hit ‘Next’.

The next window will show configuration type options. I chose ‘Standard Configuration’, as it is the easiest. Hit ‘Next’.

Here you’ll select the windows operating system options. Leave ‘Install As Windows Service’ checked, and if you’d like, select ‘Include Bin Directory in Windows PATH’ if you’d like to use MySQL from the command line later without having to navigate to the MySQL install directory. Hit ‘Next’.

This window is where you’ll put in your administrative password. Leave ‘Modify Security Settings’ checked, and put in a password. My screenshot may be slightly different as I had this installed before – I’m going through it again for everyone’s benefit here on the blog.

Leave ‘Create An Anonymous Account’ unselected, as the installer notes, “this can lead to an insecure system”.

After you’re done, hit ‘Next’.

Your configuration is ready to execute! Select ‘Execute’ to begin.

Your configuration will be processed, which should result in the final success screen. Select ‘Finish’.

Now, we could get all command-line here, but I thought it might be helpful to have a GUI manager installed. (Its really cool to see all the tables and such after they’ve been populated.)
So, for those of you who don’t know how to create databases and all that wonderful geekery from the command line, here’s the steps!

(If you already know how to do this using the command line, go ahead – you probably don’t need this tutorial either if you know that, haha.)

Grab Toad for MySQL here:

****THIS GUIDE IS OUTDATED, LINKS HAVE BEEN REDACTED.****

http://www.toadsoft.com/toadmysql/

Launch Setup, hit ‘Next’

Accept the license agreement, hit ‘Next’

User Information, put in your name and organization if applicable. I selected ‘anyone who uses this computer’ for ease-of-use.

Accept the default directory for install

Now a bunch of files will be copied and installed, so wait a bit for this to finish.

If all goes well, you’ll see this window. Leave the release notes checked if you wish to view those, and accept the default to start Toad when installation is completed. hit ‘Finish’.

You’ll now see the main interface for the MysQL manager.

Close the launch page by selecting the ‘x’ to the right of the launch page tab.

Lets make sure you can view the ‘object palette’ by clicking on ‘View’ on the upper toolbar, and selecting ‘Object Palette’. This will allow you to create and view your database.

Lets create our database! Use the small ‘< >’ arrows to scroll the tabs in the object palette until you see ‘Databases’.

Right-click on one of the existing database entries, and select ‘Create Database’.

A small window will pop up asking for you to enter the name of your database. Put in ‘opensim’, and hit ‘Ok’.

You’ll now see a database called ‘opensim’ created in the object palette window!

If you double-click on ‘opensim’, a viewer database window will open to the right. There isn’t anything in there now, but don’t worry, on the first execution of OpenSim (after some OpenSim.ini changes), this will be populated with items.

Go down to the bottom of the object palette window, and select the Connection Manager tab.

Right-click on ‘root@localhost’ and select properties.

This will pop up a window where you can enter the same password you specified for your MySQL server install earlier.

Put in the database name ‘opensim’ as well. Leave the port to its default, and make sure ‘Save password’ and
‘Connect on startup’ is checked.

Select ‘Save’.

You can now close Toad for MySQL :)

Time for some OpenSim.ini changes, so all of this will work. (note, some of this may not look exactly like your configs or opensim server window messages because I’m using the latest trunk version.)

Navigate to your OpenSim bin directory, and open up OpenSim.ini (you made a full backup, right? If not, see the note at the very beginning.)

You’re going to see a few screencaps of my .ini file, but it should give you an idea of exactly what to do. Any instance of “OpenSim.Data.SQLite.dll” is going to be commented out using the semicolon, and we’re going to replace it with a few MySQL plugin and connection strings. (substitute your password where I’ve put ‘yourpassword’.)

Under ‘STORAGE’ make the changes below:

Under the ‘StandAlone’ section, for asset database make the changes below:

Under the ‘Inventory database’ section, make the changes below:

Under the ‘User Data Database’ section, make the changes below:

There, now you’re done!

Fire up your opensim server. You should see a bunch of asset creation messages and migration messages as it populates the new MySQL database you’ve made.

Now login and enjoy your enabled database!

About these ads

About this entry