Friday, March 27, 2015

How to connect from windows command prompt to mysql command line

The cd in your question is invalid 


cd CD:\MYSQL\bin\
 
You can't cd to CD:\ anything, because CD:\ isn't a valid directory in Windows. CD: would indicate a drive, except that drives are restricted to a single letter between A and Z

If your \MYSQL\BIN is on drive C:, then your commands need to be:


C:\>cd \MYSQL\Bin

C:\MYSQL\Bin>mysql -u root -p admin

-
 
If you're not already on C: (which you'll know by looking at the prompt in the cmd window), or your MySQL folder is on another drive (for instance, D:), change to that drive too:


C:\> cd /d D:\MYSQL\Bin

D:\MYSQL\Bin>mysql -u root -p admin

-
 
 
The .exe after mysql is optional, since .exe is an executable extension on Windows. If you type mysql, Windows will automatically look for an executable file with that name and run it if it finds it.

1 comment:

  1. My friend Suggest me this blog and I can say this is the best blog to get the basic knowledge.Thank you so much for this Selenium Training in Chennai

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...