Note: Please make sure that you have checked the command prompt feature during mysql installation.
Step 1: type “cmd” into your run window of your OS
Step 2: type below command into your cmd terminal
>mysql -h localhost -u root -p
it will ask for passwod like below
Enter password: ****
you need to give password and after that press enter key.
Step 3: now it will give mysql> terminal initial, When you see mysql> it means from a MySQL prompt after successful logging into MySQL using “localhost” as a host and “root” as a user.
Step 4: Now perform any database commands into your database by creating / selecting your database.
Ex:
mysql> create database mytest;
Query OK, 1 row affected (0.00 sec)
mysql> use mytest;
Database changed
mysql>