I often use mysql environment variables. Open DOS in Windows XP and run the "mysql-u root-p" command to switch to mysql. The switchover fails, as shown below:
Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C: \> mysql-u root-p
'Mysql' is neither an internal or external command nor a running program
Or batch files.
This error occurs because the mysql PATH is not added to the mysql environment variable PATH. If you are on a unix platform, you can add a PATH through PATH = XXX; export PATH. on Windows XP, follow these steps to add the mysql path to the mysql environment variable:
Right-click "my computer"-"properties"-"advanced"-"environment variable"-"system variable"-double-click "Path"-change the mysql Path to "C: \ Program Files \ MySQL Server 5.0 \ bin add-"OK"
After adding the package, go to DOS for a 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>
Successful!
Top 10 most noteworthy MySQL Variables
Application of MySQL System Variables
Difference between NULL and MySQL NULL strings
In-depth study of MySQL result strings
MySQL string truncation Function Method