Cause and solution: The system cannot find the path to mysql. You need to log in to mysql in the bin folder in the installed mysql directory, or configure the installation path of mysql into the path environment variable. You can now directly enter commands to log in.
##Problem description:
Enter mysql -uroot - p shows that it is not an internal commandCause of the problem:
The system cannot find the path to mysql, and it needs to be in the installed mysql directory You can log in to mysql in the bin folder, or you can directly enter the command to log in by configuring the installation path of mysql to the environment variable of path.Solution steps:
1. Copy the mysql installation path bin directory
2. Right-click My Computer->Properties->Advanced System Settings
# Make sure to save all the way, open cmd again and enter mysql -uroot -p
Problem solved:)
ps: After configuring the environment variables, you need to reopen cmd to successfully log in
Recommended tutorial:
mysql video tutorialThe above is the detailed content of How to solve the problem that cmd cannot log in to mysql?. For more information, please follow other related articles on the PHP Chinese website!