Check out example codes for "login to mysql". It will help you in understanding the concepts better.

Code Example 1

mysql -u USERNAME -p

Code Example 2

use DBNAME;

Code Example 3

GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password';

Learn ReactJs, React Native from akashmittal.com