login mysql
snippet in sql

mysql cli connect with password

user4542

mysql --user=root --password=mypass

login to mysql

user5810

mysql -u USERNAME -p

login mysql

user2015

mysql -u root -p

how to connect to the database as root user in linux

user3081

GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password';

login to database mysql terminal

user772

show databases;