Analogue STRLEN() PHP function in MySQL

You can use the 2 main functions

CHAR_LENGTH(str)

OR

LENGTH(str)

Note
LENGTH() returns the length of the string measured in bytes.
CHAR_LENGTH() returns the length of the string measured in characters.