We did all of the editing in MySQL as the root user, with full access to all of the databases. However, in the cases where more restrictions may be required, there are ways to create users with custom permissions.
1. Creating a new user:
CREATE USER '<password>'@'%' IDENTIFIED BY '<password>';
2. After creating user, now it's the time to provide grants.
GRANT SELECT ON db_name.* to '<username>'@'%';
#Above command will provide read only permission to the user for specified database
3. Reload all the changes made.
FLUSH PRIVILEGES;
Sample grant example:
1. Providing full permission to a user on all databases.
GRANT ALL PRIVILEGES on *.* to '<username>'@'%';