open mysql in terminal code example
Example 1: start mysql server linux terminal
sudo /etc/init.d/mysql start
or
systemctl start mysql.service
Example 2: open mysql in ubuntu terminal
mysql -u root -p
Example 3: mysql cmd command to run
mysql.exe –uroot –p
Example 4: mysql login console
mysql -u USERNAME -p
Example 5: mysql terminal
mysql --user=user_name --password db_name
# Execute a script with logs:
mysql db_name < script.sql > output.tab