mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
[11019] Improve the security for the MySQL DB
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.
This commit is contained in:
parent
f1957ab478
commit
342b122a63
2 changed files with 5 additions and 6 deletions
|
|
@ -1,14 +1,13 @@
|
|||
GRANT USAGE ON * . * TO 'mangos'@'localhost' IDENTIFIED BY 'mangos' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 ;
|
||||
|
||||
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;
|
||||
|
||||
GRANT ALL PRIVILEGES ON `mangos` . * TO 'mangos'@'localhost' WITH GRANT OPTION;
|
||||
CREATE USER 'mangos'@'localhost' IDENTIFIED BY 'mangos';
|
||||
|
||||
GRANT ALL PRIVILEGES ON `characters` . * TO 'mangos'@'localhost' WITH GRANT OPTION;
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, LOCK TABLES ON `mangos`.* TO 'mangos'@'localhost';
|
||||
|
||||
GRANT ALL PRIVILEGES ON `realmd` . * TO 'mangos'@'localhost' WITH GRANT OPTION;
|
||||
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';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11018"
|
||||
#define REVISION_NR "11019"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue