diff --git a/app/DATABASE_CREATION_AND_INSTALLATION.sql b/app/DATABASE_CREATION_AND_INSTALLATION.sql new file mode 100644 index 0000000..469a4cd --- /dev/null +++ b/app/DATABASE_CREATION_AND_INSTALLATION.sql @@ -0,0 +1,18 @@ +-- Create a database for ForgottenServer +CREATE DATABASE IF NOT EXISTS forgottenserver CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; + +-- Create a user for specific for the database +CREATE USER IF NOT EXISTS forgottenserver@localhost IDENTIFIED BY 'forgotten'; + +-- Set privileges to the new user +GRANT ALL PRIVILEGES ON forgottenserver.* TO 'forgottenserver'@'localhost'; +FLUSH PRIVILEGES; + +-- forgottenserver database schema installation +SOURCE '/home/tibia/SabrehavenServer/sabrehaven.sql'; + +-- ZnoteAAC database schema installation +SOURCE '/var/www/ZnoteAAC/engine/database/znote_schema.sql'; + +-- Install sabrehaven_znote.sql for Sabrehaven usage +SOURCE '/home/tibia/SabrehavenServer/sabrehaven_znote.sql';