MySQL Removing and Creating a database

From Swivel Knowledgebase
Jump to: navigation, search


Overview

For appliance version 2.09, CMI 0.9w the permissions on the MySQL database for the user pinsafe need to be configured to use the MySQL database. If a database creation has been attempted, then a partial database may exist and have to be removed and recreated. This should only be attempted on a new database containing no user data.

Prerequisites

PINsafe appliance hardware or VMWare build 2.09

Symptoms

192.168.0.1 admin:Unable to open the database: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'PINSAFEL' already exists

192.168.0.1 admin:PINsafe data migration failed! com.swiveltechnologies.pinsafe.user.database.DatabaseException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'PINSAFEL' already exists

Solution

Ensure the pinsafe database user permissions are correct, see MySQL permissions

Login to the appliance webmin function default: https://192.168.0.35:10000/


To remove the pinsafe database Select Servers/MySQL Database Server. Under MySQL Databases put a tick into the pinsafe database, then click on Drop Selected Databases. A message appears;

Are you sure you want to drop the 1 selected databases? 5 tables containing 0 rows of data will be deleted.

Click on Drop Databases to confirm. The pinsafe database will be removed.


To create the pinsafe database Select Servers/MySQL Database Server. Under MySQL Databases select Create a new database. Enter Database name pinsafe and leave all other options as default then click on create. The PINsafe database will now be listed as a MySQL Database.