Syntax:
ENCODE(str,pass_str)

ENCODE() encrypts str using pass_str as the password. The result is a
binary string of the same length as str. To decrypt the result, use
DECODE().

*Note*:

The ENCODE() and DECODE() functions are deprecated in MySQL 5.7, and
should no longer be used. Expect them to be removed in a future MySQL
release.

If you still need to use ENCODE(), a salt value must be used with it to
reduce risk. For example:

ENCODE('cleartext', CONCAT('my_random_salt','my_secret_password'))

A new random salt value must be used whenever a password is updated.

URL: https://dev.mysql.com/doc/refman/5.7/en/encryption-functions.html

