Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to work with a MySQL 5.5 table using QGIS 1.8. I can do "Add Vector Layer", choose "Database", and successfully connect to the MySQL connection I previously set up. QGIS shows me a "Select vector layers to add" dialog that lists the tables in my database, including the one I want to use which shows a "Geometry type" of "Point" (which is correct, there's a POINT column in that table). When I highlight that table from the list and click OK I get an error message:

The layer MySQL:[redacted connection info] is not a valid layer and can not be added to the map

Is there something that needs to be done to make a MySQL table a "valid layer" other than making sure that it has a geometry field (like a point)?

share|improve this question
Can you make a connection directly with ogr? Try using ogrinfo to see what it tells you about the table. The syntax is to use is at the bottom of this page: – HeyOverThere Nov 10 '12 at 17:11

Does your MySQL data have a MySQL spatial index? Additionaly do you have spatial extensions installed for MySQL? I don't know if this is the problem, but without more information I will offer it as a possible solution.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.