MySQL 8 Geospatial Queries, MakeEnvelope Workaround? I'm trying to work with some data from Google Maps and have a few locations along with their bounding boxs (northeast, southwest) data stored.

Using that data, I have the following query...

SELECT
    * 
FROM
    `address_components` 
WHERE
    MBRContains (
        ST_MakeEnvelope (
            ST_GeomFromText ( 'POINT(39.643950680292 -79.981536819708)', 4326 ),
            ST_GeomFromText ( 'POINT(39.641252719708 -79.984234780292)', 4326 )
        ),
        `location`
    );


The problem I'm running into with this though is that it's saying:


  3618 - st_makeenvelope(POINT, POINT) has not been implemented for geographic spatial reference systems.


How can I work around this issue?

Additionally, how would I change this so that instead of hard-coding my bounding box, I can select a row based on a place_id and then find all records that its location falls within the envelope of?
There is clearly no work around for this issue.


MySQL can't do this operation (and many others) on a geographic srs.
You can't reproject in MySQL.


Oracle MySQL doesn't want to compete with Oracle Spatial. So you're SOL. MariaDB is currently behind MySQL in GIS too and it's a low-priority item for them. Either reproject to something Web Mercator and do Cartesian bounding box stuff, or PostgreSQL and PostGIS, which can do geographic bounding boxes, and on an index at that. And, also ST_Transform from one SRS to another.

PostGIS is the goto solution for GIS.