Create MySQL User And Grant Privileges

From Tech Wiki
Revision as of 19:06, 8 March 2023 by Adam.birds (talk | contribs) (Created page with "To create a MySQL user and grant privileges run the below commands: <pre> CREATE USER 'username'@'localhost' IDENTIFIED BY 'SuperSecurePassword'; </pre> <pre> GRANT ALL PRIV...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

To create a MySQL user and grant privileges run the below commands:

CREATE USER 'username'@'localhost' IDENTIFIED BY 'SuperSecurePassword';
GRANT ALL PRIVILEGES ON databasename . * TO 'username'@'localhost';
FLUSH PRIVILEGES;