mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
There has been a security risk as the 'mangos' user had full access to all databases on the MySQL server. The new create_mysql.sql file now gives more restrictive rights so that the 'mangos' user can only do what he really needs to do. If you have already set up the DB and want to make sure, that it's more secure, open up the MySQL doc about the 'REVOKE' command and revoke all rights for that user from any other db. Alternatively you can revoke ALL rights from the 'mangos' user and then re-grant him as done in the file.
13 lines
632 B
SQL
13 lines
632 B
SQL
CREATE DATABASE `mangos` 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;
|
|
|
|
CREATE USER 'mangos'@'localhost' IDENTIFIED BY 'mangos';
|
|
|
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, LOCK TABLES ON `mangos`.* TO 'mangos'@'localhost';
|
|
|
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, LOCK TABLES ON `characters`.* TO 'mangos'@'localhost';
|
|
|
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, LOCK TABLES ON `realmd`.* TO 'mangos'@'localhost';
|