SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
= ERROR: Table 'traccar.DATABASECHANGELOGLOCK' doesn't exist
CREATE TABLE traccar.DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED BIT(1) NOT NULL, LOCKGRANTED datetime NULL, LOCKEDBY VARCHAR(255) NULL, CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))
= ERROR: Tablespace '`traccar'.'DATABASECHANGELOGLOCK' exists.
I have encountered this situation where the table doesn't exist but it also cant be created because it already exists.
Suggestions?
What database are you using? Have you tried it without explicitly specifying database name? Have you checked what the table name is in the database? Maybe it's case sensitive?
MySQL 5.7.31
Yes I have tried without database name
Yes ive checked the table name in the database
Ive tried both cases
Don't really have any other ideas. Can you provide access to the database?
I restored the traccar database from a backup and it worked. The DB must have become corrupt somehow?
SELECT COUNT(*) FROM traccar.DATABASECHANGELOGLOCK
= ERROR: Table 'traccar.DATABASECHANGELOGLOCK' doesn't existCREATE TABLE traccar.DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED BIT(1) NOT NULL, LOCKGRANTED datetime NULL, LOCKEDBY VARCHAR(255) NULL, CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))
= ERROR: Tablespace '`traccar'.'DATABASECHANGELOGLOCK' exists.I have encountered this situation where the table doesn't exist but it also cant be created because it already exists.
Suggestions?