You can connect to your MySQL server through the MySQL client and by using the mysql command. By default MySQL password set as a blank, so no need to enter any password while connecting
You can just use following command –
[root@host]# mysql
It should be rewarded with a mysql> prompt. Now, you are connected to the MySQL server and you can execute all the SQL commands at the mysql> prompt as follows –
mysql> SHOW DATABASES; +----------+ | Database | +----------+ | mysql | | test | +----------+