When I try logging into MySQL through command line to create a new user its "not recognized". It might have something to do with my "socket"? On MySQL workbench my socket just says "mysql" i dont know if i should change that? I have no clue about mysql. PLease help.
'mysql' is not recognized as an internal or external command
11.5k Views Asked by Joshua Minchew At
3
There are 3 best solutions below
0

With "environment variables", search and click on "Edit the system environment variables":
Then, click on "Environment Variables...":
Then, set "C:\Program Files\MySQL\MySQL Server 8.0\bin" (in my case) to "Path" of either or both "User variables" or "System variables":
Then, with the command below, open MySQL Command-Line Client:
mysql -u root -p
Don't open MySQL Command-Line Client with the command below:
mysql
Because you will get this error below:
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)
If the error you are getting is
'mysql' is not recognized as an internal or external command, operable program or batch file.
then you probably don't have mysql on the PATH. First, try closing your cmd window and open another one. After installing software, the PATH variable will be updated, but cmd windows don't update after they're opened.