环境:msyql版本5.0,windows操作系统
mysqladmin命令修改密码
034039->123456 C:/Users/ASUS>mysqladmin -u root -p034039 password 123456C:/Users/ASUS>mysql -u root -p123456Welcome to the MySQL monitor. Commands end with ; or /g.Your MySQL connection id is 32Server version: 5.0.96-community-nt MySQL Community Edition (GPL)Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.mysql>
大坑:
这条语句C:/Users/ASUS>mysqladmin -u root -p123456 password '034039';
其实新的密码为'034039';
也就是说单引号被解释为密码的一部分
你说坑不坑 C:/Users/ASUS>mysqladmin -u root -p123456 password '034039';C:/Users/ASUS>mysql -u root -p'034039'