Check out example codes for "create database and grant user rights mariadb". It will help you in understanding the concepts better.

Code Example 1

create database [DB name];

CREATE USER '[DB_User_Name]'@'localhost' IDENTIFIED BY '[DB_Password]';
GRANT ALL PRIVILEGES ON [DB_Name].* TO '[DB_User_Name]'@'localhost';

show grants for 'demouser'@'localhost';

FLUSH PRIVILEGES;

Learn ReactJs, React Native from akashmittal.com