MartyIX
MartyIX

Reputation: 28646

Why am I getting different output from password function?

http://dev.mysql.com/doc/refman/5.1/en/encryption-functions.html#function_password - the documentation says that

mysql> SELECT PASSWORD('badpwd');
    -> '*AAB3E285149C0135D51A520E1940DD3263DC008C'

But I get:

 > SELECT PASSWORD('badpwd')
-> 7f84554057dd964b

MySQL version: 5.1.56-log through PHP extension MySQLi, Linux

Is it a mistake in docs?

Thanks!

Upvotes: 0

Views: 80

Answers (1)

conrad10781
conrad10781

Reputation: 2273

It's not a mistake in the documents. I just verified on my MySQL 5.1.x instance:

SELECT PASSWORD('badpwd');

PASSWORD('badpwd')-> *AAB3E285149C0135D51A520E1940DD3263DC008C

Would it be possible to see your full PHP example, to potentially better pinpoint the issue?

Upvotes: 1

Related Questions