connect mysql terminal ubuntu code example Example 1: open mysql in ubuntu terminal mysql -u root -p Example 2: connect to mysql database ubuntu mysql -u USERNAME -p