The examples were created with the MyWAY SQL manager: Download
How to use the PASSWORD() function in MySQL and MariaDB databases
In MySQL and MariaDB the PASSWORD() function is used to hash a password using the native password hashing algorithm of the database by taking a string (password) as input and returning the hashed value as an encoded string.
The native password hashing algorithm used by MySQL and MariaDB may vary depending on the version and configuration of the database, but there should be a better one provide security than the older password hashing algorithms such as the OLD_PASSWORD() or MD5() function, as these algorithms provide stronger protection against brute force attacks and password cracking. The function is rather unsuitable for general hashing purposes.
Further MySQL und MariaDB SQL Encryption & Compression