From CoffeeMud Wiki
|Administrator Builder Player|
|=CoffeeMUD Administrator Information=|
|Installation Help Development Modification Feature Requests Mud Grinder Wiki|
Installing Java Runtime
- ... TODO
- ... TODO
Installing MySQL Database
MySQL provides higher performance and better response in-game than the integrated FakeDB, so this is recommended after you have played around with CoffeeMud a bit and want to get started for real.
- Get the MySQL Server for Windows MSI installer from the MySQL downloads area. If you have a different operating system, get the according files for your system; on Linux, install using the package manager.
- Also get the MySQL Java / JDBC Connector ZIP archive from the MySQL Connectors downloads area. We will need this later on.
- Run the MySQL Server installer. Enter values according to your environment and intended use.
- MySQL server should now be installed and running in the background if you check with Task Manager.
- Open the coffeemud.ini configuration file and find this part of the file about fakedb:
- Add a "#" sign at the beginning of each of these lines as first letter to comment these lines out.
- Right above the fakedb configuration part, you should see this part for MySQL:
- Remove the "#" sign from each of these lines to uncomment, meaning activate them.
- Remove the "@localhost" part from the DBUSER line / variable.
- Below these, you can add these lines if you have a password set and if you want to have these settings.
- Modify the DBPASS value accordingly for what you have entered during MySQL Server installation. You can of course also use a separate, low-privilege database user account for CoffeeMud; there are tutorials on the web.
- Installing the MySQL connector we downloaded at the beginning. Open the ZIP file and inside, there should be a file called something like "mysql-connector-java-5.1.21-bin.jar". Extract this .jar file into the CoffeMud installation folder into the "lib" sub-directory.
- If you run CoffeeMud inside a development environment like Eclipse, then right-click on the "lib" folder in Eclipse, select Import. Select type "General" and "Archive file". Find the connector ZIP file and it should show a directory structure. Remove checkboxes for all directories ("src" and "doc") and all files except for the "mysql-connector-java-5.1.21-bin.jar" file so that only this file gets imported. Click next and the .jar file should be imported. If you want to do this clean, you can move the mysql-connector-bla.jar file directly into the "lib" folder instead of an own sub-directory. Finally, right-click your CoffeeMud project and select Properties and, in the new window, Build Path. Under "Libraries", click "Add .jar" and add the connector .jar file. After this, Eclipse should rebuild its workspace and the connector is now imported into Eclipse.
- If we run CoffeeMud now, it should throw an exception saying "unknown database coffeemud". This is good for now. If it says, "no suitable connector found", then the connector is installed uncorrectly. "Wrong password for user root@localhost@localhost" means you forgot to remove the "@localhost" in the DBUSER variable. "Wrong password for user root@localhost" should be obvious. "Connection failed" means your MySQL server is not running in the background.
- We now create an empty database in the MySQL server. First copy the SQL database setup script from the CoffeeMud installation directory in the sub-directory "guides\database" called "coffeemuddbmysql.sql" to your root directory ("c:\"); this is for simplicity. Now start the MySQL command line tool from your Start Menu under Programs. Enter your root password. Then type the following commands:
- create database coffeemud;
- use coffeemud;
- source c:\coffeemuddbmysql.sql;
- After the source command, you should see output lines starting with "Query OK". If it says anything else, then best check the Support page and if you find nothing, post on the Yahoo Support Group. You can now also trash the .sql file in your c:\ directory, we do not need it anymore.
- Start CoffeeMud and it should make you a starting room :-)