So far, I have been using PHP to create cryptographically secure random values, with openssl_random_pseudo_bytes. I would like to generate a cryptographically secure token within a stored function. Is RAND() what I am looking for, or is it not cryptographically secure?
I was looking into the same issue. RANDOM_BYTES(len) seems to be the solution that we have been looking for
https://dev.mysql.com/doc/refman/5.7/en/encryption-functions.html#function_random-bytes
would use something like HEX(RANDOM_BYTES(length_of_session_cookie))