I’m trying to connect to mysql server command line from my windows prompt
I write the next line in cmd but i get an error.
cd C:\MYSQL\bin\
And then i execute
mysql.exe -u=root -p=admin
but i getting this error
ERROR 1045: <28000>: Access denied for user 'root'@'localhost' <using password:YES>
Thanks,
The
cdin your question is invalid (quoting it here because you’ve removed it once, and it was there when this answer was posted):You can’t
cdtoCD:\anything, becauseCD:\isn’t a valid directory in Windows.CD:would indicate a drive, except that drives are restricted to a single letter betweenAandZ.If your
\MYSQL\BINis on driveC:, then your commands need to be: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:The
.exeaftermysqlis optional, since.exeis an executable extension on Windows. If you typemysql, Windows will automatically look for an executable file with that name and run it if it finds it.Note that in both my examples of running
mysql, there are no=signs. You should just use-pwith no password, and wait to be prompted for it instead.