右键点击“我的电脑”-“属性”-“高级”-“环境变量”-“系统变量”-双击“Path”-将mysql的路径“C:/Program Files/MySQL/MySQL Server 5.0/bin”添加进去-“确定”
添加完毕之后,再到DOS下进行测试:
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.
在WindowsXP中打开DOS,通过输入命令“mysql -u root -p”切换到mysql下,切换失败,如下所示:Microsoft Windows XP [版本 5.1.2600](C) 版权所有 1985-2001 Microsoft Corp.C:/>mysql -u root -pmysql