2

i have a table A and i want to update the creation time of this table. I understand i cant simple update ( using update query) as it is not any table.

Is there any way i can update it.

for example creation time is '2015-07-03 12:03:33' to '2015-06-03 12:03:33'

3
  • What is the storage engine of table A ? MyISAM or InnoDB ? Jun 6, 2016 at 20:43
  • Storage engine of table A is Innodb Jun 8, 2016 at 12:31
  • I don't think it is possible to change the creation time of an InnoDB table.
    – Rick James
    Jun 23, 2016 at 5:04

1 Answer 1

2

Information_Schema are views and read-only. Yo can not update meta data about tables, only by modifying actual table with ALTER TABLE. If you do an ALTER TABLE you will have current timestamp in meta data.

INFORMATION_SCHEMA is a database within each MySQL instance, the place that stores information about all the other databases that the MySQL server maintains. The INFORMATION_SCHEMA database contains several read-only tables. They are actually views, not base tables, so there are no files associated with them, and you cannot set triggers on them. Also, there is no database directory with that name.

Although you can select INFORMATION_SCHEMA as the default database with a USE statement, you can only read the contents of tables, not perform INSERT, UPDATE, or DELETE operations on them.

MySQL 5.7 Reference Manual / INFORMATION_SCHEMA Tables

What's the exact reason you need to change meta data?

1
  • This wasn't enough for me. I also had to run OPTIMIZE TABLE
    – Urbycoz
    Nov 5, 2020 at 13:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.