Create MySQL User And Grant Privileges

From Tech Wiki
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;