Creating MySQL Users/Databases

From HyperSecurity Wiki
Revision as of 15:10, 15 January 2021 by Srapaz (talk | contribs)
(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Create a database user:

create user userName;

Create a database:

create database dataBaseName;

Grant user database permissions:

grant all on dataBaseName.* to userName@localhost identified by 'PASSWORD';


Drop Users

Drop User %

drop user username;

Drop User localhost

drop user  'username'@'localhost';

Always flush privileges after modifying users:

FLUSH PRIVILEGES;

MariaDB

User Permissions