Open a new MySQL connection for each registration action

Since otherwise it seems that the connection 'dies' after a while.

Change-Id: I1e0eefc90d2e818ef5dc22f2a6f4e8e03d05e35a