MySQL – create user and grant all privileges

Create user with mysql command:


CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';

Add all privilleges to databases for user:


GRANT ALL ON *.* TO 'username'@'localhost';

Leave a Reply

Your email address will not be published. Required fields are marked *