Syntax:
RANDOM_BYTES(len)

This function returns a binary string of len random bytes generated
using the random number generator of the SSL library (OpenSSL or
yaSSL). Permitted values of len range from 1 to 1024. For values
outside that range, RANDOM_BYTES() generates a warning and returns
NULL.

RANDOM_BYTES() can be used to provide the initialization vector for the
AES_DECRYPT() and AES_ENCRYPT() functions. For use in that context, len
must be at least 16. Larger values are permitted, but bytes in excess
of 16 are ignored.

RANDOM_BYTES() generates a random value, which makes its result
nondeterministic. Consequently, statements that use this function are
unsafe for statement-based replication and cannot be stored in the
query cache.

This function is available as of MySQL 5.7.4.

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

