mysql connect terminal code example
Example 1: mysql connect command
mysql --host=localhost --user=myname --password mydb
mysql -h localhost -u myname -p mydb
Example 2: login to database mysql terminal
mysql -u USERNAME -p
Example 3: create database terminal mysql
CREATE DATABASE dbname;
Example 4: login to database mysql terminal
show databases;