MySQL Function Reference

RTRIM
Returns a string with all spaces removed from the right edge
MySQL 8.1
RTRIM(str)
Examples
MySQL 8.1
SELECT RTRIM('  Hello  ')