In this post, you will see how to install MySQL command line, on which we will execute our SQL statements. You can use either phpMyAdmin if you have XAMPP installed and running or you can use Mysql command line client. I am going to use MySQL command line client. If you want to install XAMPP then refer this post.
Using phpMyAdmin to execute SQL commands
Start the mysql and apache service in XAMPP. Go to browser and enter localhost:port_number and hit enter. Here, port_number will be the one which is configured for apache service. After this dashboard will open, in navigation bar you will find phpMyAdmin at the last. In phpMyAdmin, you can use the console to execute your statements. As you can see in the below image there is console tool. Click on it to open the console, it will provide a prompt to write our sql statements.

Type following command in the console. Select that command and hit Ctrl + Enter to exexute it. As you can see in below image we get the list of databases that are present. So you can use this console to execute you quaries and it will show the show the result in phpMyAdmin software.
show databases;

Installation of MySQL command line client
If you want to install MySQL command line client then go through the below video. You can download the installer files from here.