mysql connec code example Example 1: mysql login console mysql -u USERNAME -p Example 2: connect to mysql localhost from the mysql shell \connect root@localhost:3306