connect to the mysql server using the mysql command-line client code example
Example 1: mysql cli connect with password
mysql --user=root --password=mypass
Example 2: ubuntu access database from terminal
mysql -u USERNAME -p
mysql --user=root --password=mypass
mysql -u USERNAME -p