HOW TO FIX DELETING A TABLE THAT DOESN’T EXISTMarch 19, 2019 / byMarco / Categories : Business
In my mySQL database I noticed that there was a table missing from phpmyadmin. I tried creating the table but mySQL reported that it already exist (it was a ghost table). I tried using mysqlcheck to repair the database and it came back saying it the table didn’t exist. I then tried to create the table and mySQL returned an error message saying it already exists. That’s where I was totally CONFUSED!
After some digging around and researching, I checked the /var/lib/mysql/[database] folder to see if the table name files existed and they were there. I deleted those files and copied them from another database but still had the same issue. After copying the files you need to change the file permissions of the copied files to the mysql service.
chown -Rv mysql:mysql [database files]
After a lot of digging around, I managed to work out the solution. I need to instal mysql-utilities and run this command:
yum install mysql-utilities
mysqlfrm --diagnostic [table_name].frm
After that, the table was fixed. You can then delete it.
- Advertise Me Pty Ltd
Digital Signage Solutions
Limit to 5 sponsors.
OTHER ARTICLES YOU MAY LIKE
Outsourcing IT services is a trend that’s becoming more popular these days. According to a recent survey, more than 53% of organizations prefer outsourcing their IT functions either partially or entirely. Outsourcing it operations is a clever strategy that not only boosts employee performance but also cuts costs significantly. If you’re thinking of outsourcing your […]read more
In the workplace, numerous activities take place regularly. It includes anything from sending invoices to having group strategy sessions. It is also important to note that every office operates in its own unique ways and has different priorities. With that in mind, you want to make sure your employees are getting as much done as […]read more