Check out example codes for "mysql cli connect with password". It will help you in understanding the concepts better.

Code Example 1

mysql -u USERNAME -p

Code Example 2

show databases;

Code Example 3

mysql --user=root --password=mypass

Learn ReactJs, React Native from akashmittal.com