3

Mysql error logs only have a number next to them and the time they were created, I need to format it so that it also includes the date,

how should I do it?

130207  2:25:29 [Note] Plugin 'FEDERATED' is disabled.
130207  2:25:29 InnoDB: The InnoDB memory heap is disabled
130207  2:25:29 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
130207  2:25:29 InnoDB: Compressed tables use zlib 1.2.3
130207  2:25:29 InnoDB: Using Linux native AIO
130207  2:25:30 InnoDB: Initializing buffer pool, size = 3.0G
130207  2:25:30 InnoDB: Completed initialization of buffer pool
130207  2:25:30 InnoDB: highest supported file format is Barracuda.
130207  2:25:30  InnoDB: Waiting for the background threads to start
Mike
  • 2,132
  • 3
  • 20
  • 33
Serenade
  • 671
  • 1
  • 8
  • 10

2 Answers2

5

Isn't 130207 the 7th of February 2013 ?

mimipc
  • 1,354
  • 2
  • 14
  • 28
4

@mimipc is correct, those first 6 characters are indeed YYMMDD.

A change was introduced beginning in MySQL 5.6.9:

mysqld now writes dates to the error log in ISO (YYYY-MM-DD hh:mm:ss) format. It also includes its process ID following the date.

I would not expect this to be back-ported into previous versions... but there's a patch attached to Bug #56240 that you could probably use on earlier versions if you were really motivated... however, MySQL 5.6 is now officially in General Availability status with MySQL 5.6.10.

Michael - sqlbot
  • 169,571
  • 25
  • 353
  • 427