login at mysql code example Example 1: login mysql mysql -u root -p Example 2: mysql cmd command to run mysql.exe –uroot –p