Line 10: | Line 10: | ||
== Settings up mySQL == | == Settings up mySQL == | ||
=== Requirements === | |||
To run tmwserv with mySQL you should use a mySQL version >= 5.0.*. It was tested sucessfully with 5.0.51a. | |||
Also you have to enable the [http://dev.mysql.com/doc/refman/5.0/en/innodb.html InnoDB] storage engine as tmwserv makes use of the relational and transactional features. | |||
=== Creating a database and a user === | === Creating a database and a user === | ||
This chapter assumes, that you still have little experience working with mysql, so it does not describe how to install mysql itself. The first step to get tmwserv running under mySQL would be the creation of a database and a user. As you can easily do this with graphical frontends like [http://www.phpmyadmin.net phpMyAdmin], we will give you a handy script. Don't forget to replace the placeholders with appropriate values. For the following commands you have to be logged in as a database administrator, preferable ''root''. | This chapter assumes, that you still have little experience working with mysql, so it does not describe how to install mysql itself. The first step to get tmwserv running under mySQL would be the creation of a database and a user. As you can easily do this with graphical frontends like [http://www.phpmyadmin.net phpMyAdmin], we will give you a handy script for doing that from command line. Don't forget to replace the placeholders with appropriate values for your environment. | ||
For the following commands you have to be logged in as a database administrator, preferable ''root''. | |||
-- create a user called tmw (modify this as you whish) | -- create a user called tmw (modify this as you whish) | ||
Line 29: | Line 36: | ||
GRANT ALL PRIVILEGES ON `tmw` . * TO 'tmw'@'localhost'; | GRANT ALL PRIVILEGES ON `tmw` . * TO 'tmw'@'localhost'; | ||
Summarized | Summarized, now we have a new database called ''tmw'', a new database user ''tmw'' that has full rights in his database, and a restriction, that he is only able to connect from localhost. | ||
=== Create database tables === | === Create database tables === | ||
Line 43: | Line 50: | ||
\. ~/tmwserv/src/sql/mysql/createTables.sql | \. ~/tmwserv/src/sql/mysql/createTables.sql | ||
=== Configuring tmwserv to use the database === | |||
'''TODO''' | |||
== Settings up SQLite == | == Settings up SQLite == | ||
=== Requirements === | |||
Tmwserv has been tested with SQLite version 3.5.8 | |||
=== Preparation of database file === | |||
'''TODO''' | |||
=== Configuring tmwserv to use the database === | |||
== Settings up PostgreSQL == | == Settings up PostgreSQL == | ||
'''TODO''' |
Revision as of 09:04, 17 September 2008
This page is currently WIP and should describe how to set up the database for a new installation of tmwserv. This page should be moved to Setting up a server when finished.
Before you can set up your own server you have to decide wich database backend you want to use. Currently, the server supports three different types of database backends:
- mySQL
- SQLite
- PostgreSQL
Settings up mySQL
Requirements
To run tmwserv with mySQL you should use a mySQL version >= 5.0.*. It was tested sucessfully with 5.0.51a. Also you have to enable the InnoDB storage engine as tmwserv makes use of the relational and transactional features.
Creating a database and a user
This chapter assumes, that you still have little experience working with mysql, so it does not describe how to install mysql itself. The first step to get tmwserv running under mySQL would be the creation of a database and a user. As you can easily do this with graphical frontends like phpMyAdmin, we will give you a handy script for doing that from command line. Don't forget to replace the placeholders with appropriate values for your environment.
For the following commands you have to be logged in as a database administrator, preferable root.
-- create a user called tmw (modify this as you whish) -- the 'localhost' says, that our new user is only allowed from our local machine CREATE USER 'tmw'@'localhost' IDENTIFIED BY '<insert your password preferred here>';
-- allow the user to connect to the server without any resource limitations GRANT USAGE ON * . * TO 'tmw'@'localhost' IDENTIFIED BY '<again your pwd>' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
-- create a new database called 'tmw' but you can name it just as you like CREATE DATABASE IF NOT EXISTS `tmw` ;
-- give our new user full privileges on our new created database GRANT ALL PRIVILEGES ON `tmw` . * TO 'tmw'@'localhost';
Summarized, now we have a new database called tmw, a new database user tmw that has full rights in his database, and a restriction, that he is only able to connect from localhost.
Create database tables
If our new database user is ready for use, we have to create all necessary tables. The installation of tmwserv provides you with a ready to use database script. You can find this script under ./src/sql/mysql/createTables.sql To run this script connect as user tmw with your database.
mysql --host localhost --user tmw --password --database tmw --no-beep
After typing your password you should be connected to the database. The command \. runs a database script.
\. <path to the script>/createTables.sql -- e.g. \. ~/tmwserv/src/sql/mysql/createTables.sql
Configuring tmwserv to use the database
TODO
Settings up SQLite
Requirements
Tmwserv has been tested with SQLite version 3.5.8
Preparation of database file
TODO
Configuring tmwserv to use the database
Settings up PostgreSQL
TODO