Home > Database > Mysql Tutorial > How to solve the problem that cmd cannot log in to mysql?

How to solve the problem that cmd cannot log in to mysql?

青灯夜游
Release: 2020-10-05 15:49:18
Original
6538 people have browsed it

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.

How to solve the problem that cmd cannot log in to mysql?


##Problem description:

Enter mysql -uroot - p shows that it is not an internal command

Cause 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 tutorial

The 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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template