Connect to SQL from command prompt in Windows

Share

After installing the Xampp for Windows, you  can use command prompt for practicing SQL on your desktop.
These are the following steps for using command prompt in order to do SQL practice.

1. Firstly, go to Start tab from your desktop and type in command prompt in the search box.

 

 

2. In command prompt, type in following path as mentioned below.
( Note: Xampp  should be installed and services must be started specially Mysql from its control panel ‘go there’).
  
C:\Users\Sandeep>cd/     /* ‘cd/’ is used to go to the root directory */
C:\>cd xampp             /* ‘cd’ is used to change the path */
C:\xampp>cd mysql        
C:\xampp\mysql>cd bin    / These commands simply represent ‘C:xamppmysqlbin’ */


3. Now, you need to specify your MySQL username  which is usually root  and there password don’t required .

C:\xmapp\mysql\bin>mysql -u root -p


4. Now you are in MySQL.





This post was last modified on July 4, 2022

Sandeep Verma

Published by
Sandeep Verma
Tags: command prompt set up sql SQL from command prompt in Windows