本文介绍了在MySQL SERVER 8.0中,PASSWORD功能不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在MySQL Server版本8.0.12中执行PASSWORD函数时出错

Error while executing the PASSWORD function in MySQL Server version 8.0.12

我有以下查询:

SELECT * 
FROM users 
WHERE login = 'FABIO' 
  AND pwd = PASSWORD('2018') 
LIMIT 0, 50000

我收到此错误:

推荐答案

OP的MySQL服务器版本为8.0.12.从 MySQL文档,函数 strong>:

OP's MySQL Server version is 8.0.12. From MySQL Documentation, PASSWORD function has been deprecated for version > 5.7.5:

本节中的信息仅在MySQL 5.7.5之前完全适用, 并且仅适用于使用mysql_native_password的帐户或 mysql_old_password身份验证插件.支持4.1之前的版本 密码哈希在MySQL 5.7.5中已删除.这包括删除 mysql_old_password身份验证插件和OLD_PASSWORD() 功能.另外,secure_auth无法禁用,并且old_passwords 不能设置为1.

The information in this section applies fully only before MySQL 5.7.5, and only for accounts that use the mysql_native_password or mysql_old_password authentication plugins. Support for pre-4.1 password hashes was removed in MySQL 5.7.5. This includes removal of the mysql_old_password authentication plugin and the OLD_PASSWORD() function. Also, secure_auth cannot be disabled, and old_passwords cannot be set to 1.

从MySQL 5.7.5开始,只有有关4.1密码哈希和 mysql_native_password身份验证插件仍然有用.

As of MySQL 5.7.5, only the information about 4.1 password hashes and the mysql_native_password authentication plugin remains relevant.

相反,在PASSWORD函数中,您可以使用此处.可以在此处.

Instead, of the PASSWORD function, you can use much better and secure encryption functions from here. More details from the MySQL server team can be seen here.

这篇关于在MySQL SERVER 8.0中,PASSWORD功能不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 04:21