Zusätzlich zu dem Passwort, das mit einem Stern beginnt, gibt es hier einen Algorithmus für PASSWORD ()
SET @plaintextpassword = 'whatever password you want';
SELECT CONCAT('*',UPPER(SHA1(UNHEX(SHA1(@plaintextpassword)))));
BEISPIEL
mysql> SET @plaintextpassword = 'whatever password you want';
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT UPPER(SHA1(UNHEX(SHA1(@plaintextpassword)))) PWD_CREATION;
+------------------------------------------+
| PWD_CREATION |
+------------------------------------------+
| D09AF2704D843A5E4E84362830C7EC1CEA40DF8A |
+------------------------------------------+
1 row in set (0.00 sec)
mysql> SELECT PASSWORD(@plaintextpassword) PWD_FUNCTION;
+-------------------------------------------+
| PWD_FUNCTION |
+-------------------------------------------+
| *D09AF2704D843A5E4E84362830C7EC1CEA40DF8A |
+-------------------------------------------+
1 row in set (0.00 sec)
mysql>
Ich habe diesen Algorithmus vor langer Zeit vom Hashing-Algorithmus in MySQL PASSWORD () gelernt.