ST_GeoHash(longitude, latitude, max_length), ST_GeoHash(point,
max_length)

Returns a geohash string in the connection character set and collation.

If any argument is NULL, the return value is NULL. If any argument is
invalid, an error occurs.

For the first syntax, the longitude must be a number in the range
[−180, 180], and the latitude must be a number in the range [−90,
90]. For the second syntax, a POINT value is required, where the X and
Y coordinates are in the valid ranges for longitude and latitude,
respectively.

The resulting string is no longer than max_length characters, which has
an upper limit of 100. The string might be shorter than max_length
characters because the algorithm that creates the geohash value
continues until it has created a string that is either an exact
representation of the location or max_length characters, whichever
comes first.

URL: https://dev.mysql.com/doc/refman/5.7/en/spatial-geohash-functions.html

