MySQL & MariaDB · lat/long order · no sign-up

Address in.
MySQL POINT out.

pointkit geocodes a plain address and hands back a MySQL/MariaDB POINT literal in SRID 4326's lat/long axis order — the reverse of Postgres, WKT, and GeoJSON, and the single most common way spatial inserts go quietly wrong.

MySQL/MariaDB · POINT
{{ heroResultText }}
SRID 4326's default axis order in MySQL/MariaDB is lat/long, the reverse of standard WKT. pointkit swaps it automatically so this literal inserts correctly.
INSERT INTO places (name, geom) VALUES ('example', {{ heroResultText }});
{{ heroErrorText }} Buy more credits →

The one convention MySQL got "backwards"

Almost everything in the spatial world — WKT, GeoJSON, PostGIS — orders coordinates as (longitude, latitude). MySQL and MariaDB's default spatial reference, SRID 4326, follows the strict EPSG definition instead and orders them as (latitude, longitude). If you're coming from Postgres, or copying a longitude/latitude pair straight from a mapping API, it's exactly backwards from what you'd expect.

Get it wrong and MySQL accepts the geometry without complaint — the point just lands on the wrong side of the map, with nothing in the logs to explain why. pointkit geocodes the address and outputs the literal in MySQL's expected order automatically, so this one never bites.

MySQL & MariaDB FAQ

Why is MySQL's axis order the reverse of Postgres/WKT?
MySQL and MariaDB's default SRID 4326 follows the strict EPSG:4326 definition literally: (latitude, longitude). Postgres/PostGIS, WKT, and GeoJSON follow the more common (longitude, latitude) convention instead. Neither is "wrong" — mixing them up is just the most common way spatial inserts fail silently.
Do I use ST_GeomFromText or POINT() in MySQL?
Either works. MySQL/MariaDB support ST_GeomFromText('POINT(...)', 4326) the same way Postgres does, plus the shorthand POINT(x, y) constructor. pointkit's literal is ready to drop straight into ST_GeomFromText.
Does this work with MariaDB, not just MySQL?
Yes. MariaDB inherited MySQL's spatial types and the same SRID 4326 axis-order convention, so the same literal is valid in both.
Can I convert a whole table of addresses at once?
Yes — export the addresses as a CSV and use pointkit's batch converter, which appends a POINT column to the file so you can load it back in with LOAD DATA INFILE or an ORM import.