log in to mysql code example
Example 1: login to database mysql terminal
mysql -u USERNAME -p
Example 2: mysql cli connect with password
mysql --user=root --password=mypass
Example 3: how to connect to the database as root user in linux
mysql -u root -p
Example 4: how to connect to the database as root user in linux
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password';