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

Code Example 1

mysql -u USERNAME -p

Code Example 2

mysql -u root -p

Code Example 3

mysql --user=root --password=mypass

Code Example 4

show databases;

Learn ReactJs, React Native from akashmittal.com