ST_AsText(g), ST_AsWKT(g)

Converts a value in internal geometry format to its WKT representation
and returns the string result.

If the argument is NULL, the return value is NULL. If the argument is
not a syntactically well-formed geometry, an ER_GIS_INVALID_DATA error
occurs.

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

