snippetsqlMinor
How to Recover truncate table in MySQL?
Viewed 0 times
recovertruncatemysqlhowtable
Problem
I am getting the "wrong input table name" when use TRUNCATE as following:
The table should
How to recover
I am using CentOS 6, and MySQL-Server.
TRUNCATE `stats`The table should
bans.How to recover
stats table?I am using CentOS 6, and MySQL-Server.
Solution
Truncate Operation Drops the existing table and recreates it .its a fast process . so we cannot get the deleted records.
Solution to this issue is to do a regular backup of the DB on a a daily or weekly basis , in order to save or restore the tables data as per requirement . and reuse it
Another solution is to export the table data before truncate and keep the data for Future reference
Solution to this issue is to do a regular backup of the DB on a a daily or weekly basis , in order to save or restore the tables data as per requirement . and reuse it
Another solution is to export the table data before truncate and keep the data for Future reference
Context
StackExchange Database Administrators Q#60722, answer score: 5
Revisions (0)
No revisions yet.