login to mysql server from terminal 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