how to run mysql ubuntu code example Example 1: start mysql server ubuntu sudo service mysql-server Example 2: open mysql in ubuntu terminal mysql -u root -p