From a2af298fd993a129b657671a41f20e3975baf0ef Mon Sep 17 00:00:00 2001
From: Andreas Habel <mail@exceptionfault.de>
Date: Wed, 17 Sep 2008 11:32:45 +0000
Subject: * Added installation scripts to set up database schemas for mysql,
 sqlite and postgresql. The create table statements have been completely
 removed out from the c++ source into separate, provider specific sql files.
 Accountserver will no longer create a sqlite file if none present. * Added
 database specific config parameters to configure each provider independent. *
 Simplified the connect routine of DALStorage class since every dataprovider
 is now responsible to retrieve its own parameters. * Extended abstract
 dataprovider to support transactions, functionally implemented for SQLite and
 mySQL. * Added methods to retrieve last inserted auto-increment value and the
 number of modified rows by the last statement. * Rewrite of DALStorage class
 to be a little more transactional. * Fixed a bug when deleting a character.
 Old function left data in quests table and guilds table. * Doxygen now also
 includes non-documented functions and provides a dictionary for all classes

---
 src/sql/mysql/createDatabase.sql | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 src/sql/mysql/createDatabase.sql

(limited to 'src/sql/mysql/createDatabase.sql')

diff --git a/src/sql/mysql/createDatabase.sql b/src/sql/mysql/createDatabase.sql
new file mode 100644
index 0000000..c40aa24
--- /dev/null
+++ b/src/sql/mysql/createDatabase.sql
@@ -0,0 +1,34 @@
+/*
+ *  The Mana World Server
+ *  Copyright 2008 The Mana World Development Team
+ *
+ *  This file is part of The Mana World.
+ *
+ *  The Mana World  is free software; you can redistribute  it and/or modify it
+ *  under the terms of the GNU General  Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or any later version.
+ *
+ *  The Mana  World is  distributed in  the hope  that it  will be  useful, but
+ *  WITHOUT ANY WARRANTY; without even  the implied warranty of MERCHANTABILITY
+ *  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ *  more details.
+ *
+ *  You should  have received a  copy of the  GNU General Public  License along
+ *  with The Mana  World; if not, write to the  Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ *  $Id$
+ */
+
+CREATE USER 'tmw'@'%' IDENTIFIED BY 'testtest';
+CREATE USER 'tmw'@'localhost' IDENTIFIED BY 'testtest';
+
+GRANT USAGE ON * . * TO 'tmw'@'%' IDENTIFIED BY 'testtest' 
+	WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
+GRANT USAGE ON * . * TO 'tmw'@'localhost' IDENTIFIED BY 'testtest' 
+	WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
+
+CREATE DATABASE IF NOT EXISTS `tmw` ;
+
+GRANT ALL PRIVILEGES ON `tmw` . * TO 'tmw'@'%';
+GRANT ALL PRIVILEGES ON `tmw` . * TO 'tmw'@'localhost';
-- 
cgit 

