aboutsummaryrefslogtreecommitdiff
path: root/sql/create
diff options
context:
space:
mode:
authorBrian <runningnak3d@gmail.com>2010-06-09 00:54:15 -0600
committerBrian <runningnak3d@gmail.com>2010-06-09 00:54:15 -0600
commitc97247a990501b0df7ce31cb6372332b1d6f3af0 (patch)
treee6deb36d8efaf2e074e16a422e277f6a8b5da5f7 /sql/create
parent0a4899646d5b65c9221727f8f49b5ab7a6f03e7a (diff)
* Renamed some directories in sql/ to more accurately reflect their purpose
--HG-- branch : trunk rename : sql/auth_database.sql => sql/base/auth_database.sql rename : sql/character_database.sql => sql/base/character_database.sql rename : sql/world_database.sql => sql/base/world_database.sql rename : sql/tools/CMakeLists.txt => sql/create/CMakeLists.txt rename : sql/tools/create_mysql.sql => sql/create/create_mysql.sql rename : sql/tools/drop_mysql.sql => sql/create/drop_mysql.sql rename : sql/full/CMakeLists.txt => sql/scripts/CMakeLists.txt rename : sql/full/world_script_texts.sql => sql/scripts/world_script_texts.sql rename : sql/full/world_script_waypoints.sql => sql/scripts/world_script_waypoints.sql rename : sql/full/world_scripts_full.sql => sql/scripts/world_scripts_full.sql
Diffstat (limited to 'sql/create')
-rw-r--r--sql/create/CMakeLists.txt5
-rw-r--r--sql/create/create_mysql.sql13
-rw-r--r--sql/create/drop_mysql.sql21
3 files changed, 39 insertions, 0 deletions
diff --git a/sql/create/CMakeLists.txt b/sql/create/CMakeLists.txt
new file mode 100644
index 00000000000..91cb61ec84e
--- /dev/null
+++ b/sql/create/CMakeLists.txt
@@ -0,0 +1,5 @@
+########### install files ###############
+
+FILE(GLOB _SQL *.sql)
+
+install(FILES ${_SQL} DESTINATION share/trinity/sql/tools) \ No newline at end of file
diff --git a/sql/create/create_mysql.sql b/sql/create/create_mysql.sql
new file mode 100644
index 00000000000..dc272ebf697
--- /dev/null
+++ b/sql/create/create_mysql.sql
@@ -0,0 +1,13 @@
+GRANT USAGE ON * . * TO 'trinity'@'localhost' IDENTIFIED BY 'trinity' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 ;
+
+CREATE DATABASE `world` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
+
+CREATE DATABASE `characters` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
+
+CREATE DATABASE `realmd` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
+
+GRANT ALL PRIVILEGES ON `world` . * TO 'trinity'@'localhost' WITH GRANT OPTION;
+
+GRANT ALL PRIVILEGES ON `characters` . * TO 'trinity'@'localhost' WITH GRANT OPTION;
+
+GRANT ALL PRIVILEGES ON `realmd` . * TO 'trinity'@'localhost' WITH GRANT OPTION;
diff --git a/sql/create/drop_mysql.sql b/sql/create/drop_mysql.sql
new file mode 100644
index 00000000000..c0ec81e378f
--- /dev/null
+++ b/sql/create/drop_mysql.sql
@@ -0,0 +1,21 @@
+REVOKE ALL PRIVILEGES ON * . * FROM 'trinity'@'localhost';
+
+REVOKE ALL PRIVILEGES ON `world` . * FROM 'trinity'@'localhost';
+
+REVOKE GRANT OPTION ON `world` . * FROM 'trinity'@'localhost';
+
+REVOKE ALL PRIVILEGES ON `characters` . * FROM 'trinity'@'localhost';
+
+REVOKE GRANT OPTION ON `characters` . * FROM 'trinity'@'localhost';
+
+REVOKE ALL PRIVILEGES ON `realmd` . * FROM 'trinity'@'localhost';
+
+REVOKE GRANT OPTION ON `realmd` . * FROM 'trinity'@'localhost';
+
+DROP USER 'trinity'@'localhost';
+
+DROP DATABASE IF EXISTS `world`;
+
+DROP DATABASE IF EXISTS `characters`;
+
+DROP DATABASE IF EXISTS `realmd`;