Entering mysql -u root -p on the command line shows that it is neither an internal or external command nor a runnable program. How to solve this situation?

> I originally planned to build a local database, and then entered mysql -u root -p, which showed such a situation. I didn’t know what to do. I searched online and found that it was a problem with the environment configuration. Environment configuration feels a headache every time I see it. Let's solve it below!

1. Open the computer properties advanced system settings

 2. Click on the environment configuration and click on the path in the system configuration to create a new one

3. Copy the bin path in MySQL 

Mine is to find Program Files in the c drive, find MySQL, find mysql server, click to enter bin, copy the path, and paste it into the environment configuration

 4. Finally, open the command line, win+R, enter cmd, enter mysql -u root -p and it's OK!

 

おすすめ

転載: blog.csdn.net/weixin_65143132/article/details/128132845