According to the PyQGIS Developer Cookbook all I have to do is add

category=Database

However, that does not have any effect. Do I have to add something in my initGui as well?

Currently the initGui looks like this:

def initGui(self): self.importCSV_action = QAction('Import CSV', self.iface.mainWindow()) QtCore.QObject.connect(self.importCSV_action, QtCore.SIGNAL("activated()"),self.importCSV) self.iface.addPluginToMenu('xxx', self.importCSV_action)

If I leave the category=Database out in my metadata.txt the plugin appears as expected in the Plugins menu.

The category entry in the metadata.txt is only minded as a tip for the plugin user. From the pyqgis developer cookbook: http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/plugins.html

A corresponding “category” metadata entry exists to specify that, so the plugin can be classified accordingly. This metadata entry is used as tip for users and tells them where (in which menu) the plugin can be found. Allowed values for “category” are: Vector, Raster, Database or Web. For example, if your plugin will be available from Raster menu, add this to metadata.txt

If you use the latest Plugin Builder tool the code:

self.iface.addPluginToMenu(self.menu,action)

Should be:

self.iface.addPluginToDatabaseMenu(self.menu,action)

self.iface.addPluginToDatabaseMenu('xxx', self.importCSV_action)