Computer >> Computer tutorials >  >> Programming >> MySQL

How to open MySQL command line on Windows10?


To open the MySQL command line from cmd, you need to use username root with your password.

Follow the below given steps. The syntax is as follows −

cd \> press enter key
cd Program Files\MySQL\MySQL Server 8.0\bin> press enter key
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -uroot -p press enter key
Enter password: ******

Here is the step by step instruction to open MySQL command line. First, Go to START > RUN or Open Run using Windows+R command −

How to open MySQL command line on Windows10?

Type CMD and hit OK button −

How to open MySQL command line on Windows10?

After pressing OK button, the CMD will open −

How to open MySQL command line on Windows10?

Now you need to follow the above instruction. First reach your bin directory and follow the below given steps −

Step 1

How to open MySQL command line on Windows10?

Step 2

How to open MySQL command line on Windows10?

Now write the below command to open MySQL command line.

Step 3

How to open MySQL command line on Windows10?

Now press the enter button.

Step 4

How to open MySQL command line on Windows10?

After that you need to provide the password.

Step 5

How to open MySQL command line on Windows10?

After that you need to press enter key to open the MySQL command line −

How to open MySQL command line on Windows10?