>

statement的消除措施

- 编辑:www.bifa688.com -

statement的消除措施

行使安全情势成功登入,然后修改密码,等于给MySql设置了密码。登入进去后,想询问全体存在的数据库测试下。得到的结果的确:

参照他事他说加以考查前文利用安全格局成功登入,然后修改密码,等于给MySql设置了密码。登录进去后,想成立一个数据库测试下。得到的结果的确:

ERROR 1820 (HY000): You must SET PASSWORD before executing this statement

ERROR 1820 (HY000): You must SET PASSWORD before executing this statement

可怜好奇啊,明明用密码登录进去了,怎么还提示需求密码。
参照官方的一个文书档案,见

足够古怪啊,明明用密码登入进去了,怎么还提示必要密码。
参照官方的3个文书档案,见

mysql> show databases;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
mysql> SET PASSWORD = PASSWORD('123456');
Query OK, 0 rows affected (0.00 sec)

mysql> create database yan1;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
mysql> SET PASSWORD = PASSWORD('123456');
Query OK, 0 rows affected (0.03 sec)

mysql> show databases;
5 rows in set (0.00 sec)

mysql> create database yan1;
Query OK, 1 row affected (0.00 sec)

也正是用mysql> SET PASSWO福特ExplorerD = PASSWO福睿斯D('12345陆');那句话再一次设置三遍密码!哎,搞得真费力啊。

相当于用mysql> SET PASSWO普拉多D = PASSWOQX56D('12345陆');那句话再一次设置三回密码!三叔的,真费力啊。
那位老兄也遇到了同样的主题素材。

有个别童鞋也会境遇如下难题:

新近新装好的mysql在进入mysql工具时,总是有错误指示:

近年新装好的mysql在进入mysql工具时,总是有不当提醒:

# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
或者
# mysql -u root -p password 'newpassword'
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'

# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
或者
# mysql -u root -p password 'newpassword'
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'

至今总算找到化解措施了。本来希图重装的,未来不用了。
办法操作很简短,如下:
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWOSportageD('newpassword') where USECR-V='root' and host='root' or host='localhost';//把空的用户密码都修改成非空的密码就行了。
mysql> FLUSH PRIVILEGES;
mysql> quit # /etc/init.d/mysqld restart
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>

现行反革命算是找到化解方式了。本来策画重装的,未来无须了。
主意操作异常粗略,如下:
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWOTiguanD('newpassword') where USEPRADO='root' and host='root' or host='localhost';//把空的用户密码都修改成非空的密码就行了。
mysql> FLUSH PRIVILEGES;
mysql> quit # /etc/init.d/mysqld restart
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>

MySql五.陆操作时报错:You must SET PASSWOHighlanderD before executing this statement解决
mysql> SET PASSWORD = PASSWORD('123456');
Query OK, 0 rows affected (0.03 sec)
mysql> create database roger;
Query OK, 1 row affected (0.00 sec)
也正是用mysql> SET PASSWOKugaD = PASSWOTiguanD('12345陆');那句话再一次设置三次密码!

MySql五.陆操作时报错:You must SET PASSWO猎豹CS6D before executing this statement化解
mysql> SET PASSWORD = PASSWORD('123456');
Query OK, 0 rows affected (0.03 sec)
mysql> create database roger;
Query OK, 1 row affected (0.00 sec)
也正是用mysql> SET PASSWO奥迪Q7D = PASSWO猎豹CS6D('123456');这句话再次安装2遍密码!就化解了。

ERRO...

本文由88bifa必发唯一官网发布,转载请注明来源:statement的消除措施