MySQL获取旧记录插入时间? [英] MySQL Get Time of Old Record Insert?
问题描述
我的数据库中有一个表,其中包含应用程序的所有用户.不幸的是,当我启动我的应用程序时,我不希望包含跟踪特定用户注册时间的专栏,而现在我希望我有(不好的主意,的确是这样).
I have a table in my database which contains all of the users for my application. Unfortunately, when I launched my application, I didn't think to include a column which tracked the time at which a particular user signed up, and now I wish I had (bad idea, yes indeed).
运气好的话,MySQL是否有一种跟踪何时插入特定记录的方式(例如记录元数据中的???),并且可以让我抓取该记录并将其插入到新的专用列中这个目的?
Is there, by any shred of luck, a way that MySQL tracks when a particular record is inserted (such as in record metadata???), and would allow me to grab it and insert in into a new dedicated column for this purpose?
我在共享的cPanel主机上运行,所以我怀疑我是否可以访问MySQL日志.
I am running on a shared cPanel host, so I doubt I have access to the MySQL logs.
谢谢您的时间.
推荐答案
只有启用了二进制日志记录,您才能跟踪事务的确切时间.
Only if you have binary logging enabled will you be able to trace exact times for the transaction.
http://dev.mysql.com/doc/refman/5.5/en/binary-log.html
它不仅用于复制,而且是紧急情况下的一种事务记录形式.
Its not just for replication, but also a form of transactional recording in case of emergency.
这篇关于MySQL获取旧记录插入时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!