Skip to content

Connect to MySQL Database

Add MySQL Connection

  1. In the Data Source Manager, go to the Vector tab and add a MySQL connection as usual, specifying the required table.

  2. In the Virtual Layer tab, import the loaded MySQL table under Embedded Layers. You can then use a query like the following to filter and load data:

    sql
    SELECT id, `name`, make_point(longitude, latitude) AS geometry
    FROM project_config_toll_station
    WHERE project_id <> 6

Additional Resources

For further guidance on visualizing WKT geometry strings in QGIS, refer to this StackExchange discussion.

Credit @Wayne19980