ST_SwapXY(g)

Accepts an argument in internal geometry format, swaps the X and Y
values of each coordinate pair within the geometry, and returns the
result.

ST_SwapXY() handles its arguments as described in the introduction to
this section.

URL: https://dev.mysql.com/doc/refman/8.4/en/gis-format-conversion-functions.html

