' MySQL ' is not an internal or external command, nor is it a running program or batch file.

Source: Internet
Author: User

' MySQL ' is not an internal or external command, nor is it a running program or batch file.

Today at noon a new system, re-installed a bit of wampserver2.2. PM want to import a database file open dos, input mysql-u root-p mydb2 < E:mysqlmydb2.sql, unexpectedly appear ' MySQL ' is not internal or external command, is not a running program or batch file.

I looked up the internet and said there was no way to add the path to MySQL in the environment variable path.

You can use echo%path% to view

Under the Windows platform, you need to add the MySQL path to the environment variable:

1. Right-click on "My Computer"-"Properties"-"advanced"-"Environment variables"-"System variables"-double-click "Path"-The path of MySQL "D:wampbinmysqlmysql5.0.51bbin" (this assumes your MySQL directory is the same as I installed, In fact, you locate your MySQL installation directory and then find the bin directory to write the full path up) "Add in-" OK "

2. After the addition, then to the DOS test:

C:>mysql-u root-p
Enter Password: **********
Welcome to the MySQL Monitor. Commands End With; or G.
Your MySQL Connection ID is 21
Server version:5.0.45-community-nt MySQL Community Edition (GPL)
Type ' help ', ' or ' h ' for help. Type ' C ' to clear the buffer.
Mysql>
There is a mysql> to show success!

You can also not use the above method, you directly run the MySQL Server Instance Config Wizard can be directly configured. Very simple operation no longer to repeat.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.