Do you know any easy way to remove (or replace) all non alphanumeric characters from varchar variable in Mysql?
something like String\'s replaceAll(\"[^a-zA-Z0-9]\",
Since MySQL 8.0 you can use regular expression to remove non alphanumeric characters from a variable. There is method REGEXP_REPLACE
SELECT REGEXP_REPLACE(@variable, '[^0-9a-zA-Z ]', '')
or
SET @variable = REGEXP_REPLACE(@variable, '[^0-9a-zA-Z ]', '')