Difference between revisions of "Create MySQL User And Grant Privileges"

From Tech Wiki
Jump to navigation Jump to search
(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...")
 
(No difference)

Latest revision as of 19:06, 8 March 2023

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;