Mysql - Create user & grant permission on a database
Create user & grant permission on a database
CREATE USER 'your_username'@'%' IDENTIFIED BY 'your_password';// Some codeCREATE DATABASE `your_database_name`;//Grant all permissionGRANT ALL PRIVILEGES ON`your_database_name`.* TO 'your_username'@'%';//Grantreadonly permissionGRANT SELECT, UPDATE, DELETE, INSERT ON`your_database_name`.* TO 'your_username'@'%';