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

How to hide and remove scroll bars in HTML

1. HTML tags with attributes XML/HTML CodeCopy co...

JS implements the dragging and placeholder functions of elements

This blog post is about a difficulty encountered ...

Detailed comparison of Ember.js and Vue.js

Table of contents Overview Why choose a framework...

Analyze several common solutions to MySQL exceptions

Table of contents Preface 1. The database name or...

MySQL high concurrency method to generate unique order number

Preface After this blog post was published, some ...

Detailed explanation of JS browser event model

Table of contents What is an event A Simple Examp...

Perfect solution to Docker Alpine image time zone problem

Recently, when I was using Docker to deploy a Jav...

Using css-loader to implement css module in vue-cli

【Foreword】 Both Vue and React's CSS modular s...

Summary of basic usage of $ symbol in Linux

Linux version: CentOS 7 [root@azfdbdfsdf230lqdg1b...

Solution to Django's inability to access static resources with uwsgi+nginx proxy

When deploying uwsgi+nginx proxy Django, access u...

JavaScript color viewer

This article example shares the specific code of ...

Detailed explanation of Vue custom instructions

Table of contents Vue custom directive Custom dir...

Example code for element multiple tables to achieve synchronous scrolling

Element UI implements multiple tables scrolling a...

Example code for implementing hexagonal borders with CSS3

The outermost boxF rotates 120 degrees, the secon...