Error while executing the PASSWORD
function in MySQL Server version 8.0.12
I have the following query:
SELECT *
FROM users
WHERE login = 'FABIO'
AND pwd = PASSWORD('2018')
LIMIT 0, 50000
I am getting this error:
Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
OP's MySQL Server version is 8.0.12. From MySQL Documentation, PASSWORD function has been deprecated for version > 5.7.5:
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.