mysql is not an internal command error solution

mysql is not an internal command error solution

The error "mysql is not an internal command" occurs because the mysql bin directory path is not added to the environment variable

Solution:

Open the computer's environment variables, select system variables, open Path, and add the mysql bin directory path.

Here is an example:

Before adding environment variables

企業微信截圖_20200613135309.jpg

Add environment variables

企業微信截圖_20200613135135.jpg

企業微信截圖_20200613135149.jpg

企業微信截圖_20200613135212.jpg

After adding the environment variables, restart mysql

企業微信截圖_20200613135655.jpg

Content extension:

I used to use visual tools to call the database, but today I suddenly found out using the command line:

mysql' is not recognized as an internal or external command, operable program or batch file.

After some trouble, I found what was wrong and shared it with you.

Note 1: First check whether the environment variable has been added to the path

My Computer –> Right click -> Properties -> Advanced System Settings -> Advanced -> Environment Variables -> OK -> System Variables (S) -> Path (then double-click)

Then create a new MySQL installation path/bin path, for example, mine is C:\Program Files\MySQL\MySQL Server 5.5\bin , just add it in. Finally, make sure to remember to add the bin directory. I didn’t write this, I only added the installation directory, so I couldn’t find it.

Note 2: Be sure to run the command line as an administrator

The commonly used command line opening method is window key + R key, but this is not run as an administrator

How to open the command line as an administrator:

Method 1: Right-click the window in the lower right corner of the computer -----> Search

Method 2: Right-click the window in the lower right corner of the computer -----> Window PowerShell (Administrator)

After that, enter mysql -u account -p password, and the following will appear.

The above is the detailed solution to the error "mysql is not an internal command". For more information on how to deal with the error "mysql is not an internal command", please pay attention to other related articles on 123WORDPRESS.COM!

<<:  Nginx uses the Gzip algorithm to compress messages

>>:  Examples of correct use of interface and type methods in TypeScript

Recommend

4 ways to avoid duplicate insertion of data in Mysql

The most common way is to set a primary key or un...

How to force vertical screen on mobile pages

I recently wrote a mobile page at work, which was...

Detailed explanation of how Node.js handles ES6 modules

Table of contents 1. Differences between the two ...

Solution to the problem that the Vue page image does not display

When making a new version of the configuration in...

Summary of Binlog usage of MySQL database (must read)

I won't go into details about how important b...

Docker data storage tmpfs mounts detailed explanation

Before reading this article, I hope you have a ba...

Getting Started with MySQL - Concepts

1. What is it? MySQL is the most popular relation...

Detailed tutorial on installing mysql 8.0.20 on CentOS7.8

1. Install MySQL software Download and install My...

mysql5.6.zip format compressed version installation graphic tutorial

Preface: MySQL is a relational database managemen...

Detailed tutorial on downloading mysql on Windows 10

MySQL versions are divided into Enterprise Editio...

MySQL 8 new features: Invisible Indexes

background Indexes are a double-edged sword. Whil...

HTML table tag tutorial (17): table title vertical alignment attribute VALIGN

The table caption can be placed above or below th...