mysql connect from terminal code example
Example 1: mysql login console
mysql -u USERNAME -p
Example 2: mysql connect command
mysql --host=localhost --user=myname --password mydb
mysql -h localhost -u myname -p mydb
mysql -u USERNAME -p
mysql --host=localhost --user=myname --password mydb
mysql -h localhost -u myname -p mydb