Search This Blog

Excute simple SQL commands using MySQL Client:

You can connect to your MySQL server by using MySQL client using mysql command. At this momemnt you do not need to give any password as by default it will be set to blank.
So 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 command at mysql> prompt as follows.
mysql> SHOW DATABASES;
+----------+
Database
+----------+
mysql
test
+----------+
2 rows in set (0.13 sec)