I have a vector layer displaying geometry from a mysql view.
This works fine for several days/weeks until suddenly it fails to refresh and my layer reverts to a non-geometry table, losing all symbols, labels etc.
Closing the project without saving and reverting does not revert back to the previous working state. I am able to add a new vector layer to the same view that displays correctly but without my custom symbols.
Is there any way to fix my layer (re-establish the geometry field) without having to start from scratch?
Edit: QGIS 2.18.16, MySQL 5.6.14