Step 3 — Creating a Dedicated MySQL User and Granting Privileges
- Open MySQL prompt
mysql -u root -p
- Create a new User
CREATE USER 'username'@'host' IDENTIFIED WITH authentication_plugin BY 'password';
or
CREATE USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
- Grant privileges
GRANT PRIVILEGE ON database.table TO 'username'@'host';
No Comments