I Have an *.sql file that has no spatial information. For every record there is an id. I also have a Qgis project with polygons without any id. How can i connect the polygons with the database? I know that i have to add the same id to the shapes to make the connection. I don't know how to make the connection. Is there any tutorial that can help me?
Just, 1. add vector layer --> database--> Type-->MySQL --> connection-->New 2. complete the parameters 3. test the connection 4. import the layer(s) you want 5. add id(s) to shape's attribute tables--> join.
Just load your data into QGIS and use the tool called "Join attributes by location". According to the doc :
Join additional attributes to vector layer based on spatial relationship. Attributes from one vector layer are appended to the attribute table of another layer and exported as a shapefile.
You need to install the ftools extension.
I guess you already have MySQL server running and you already know how to import your MySQL data.