' 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.