The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mysql crash! TIMESTAMP with implicit DEFAULT value is deprecated.

Discussion in 'Database Discussions' started by stefano_ts, Sep 5, 2015.

  1. stefano_ts

    stefano_ts Member

    Joined:
    Aug 13, 2015
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    italy
    cPanel Access Level:
    Root Administrator
    What can I do?
    I can not restart the mysql service.
    Thank you

     
  2. stefano_ts

    stefano_ts Member

    Joined:
    Aug 13, 2015
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    italy
    cPanel Access Level:
    Root Administrator
    I partially solved in this way:
    - in my.cfg i added the following line: innodb_force_recovery = 1
    - i finally managed to start mysql service
    - i removed the line innodb_force_recovery = 1 from my.cfg
    - i stopped/started mysql service.

    But in /var/lib/mysql/... .err i's yet reported: [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

    what can I do?
    Thanks
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Do you have a corresponding entry in your /etc/my.cnf file for "timestamp"?

    Thank you.
     
  4. stefano_ts

    stefano_ts Member

    Joined:
    Aug 13, 2015
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    italy
    cPanel Access Level:
    Root Administrator
    The file my.cnf contains this information:

    Thank you.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You can add the following entry to your /etc/my.cnf file (assuming you are using MySQL 5.6):

    Code:
    explicit_defaults_for_timestamp=1
    Then, restart MySQL. This variable is documented at:

    https://dev.mysql.com/doc/refman/5....s.html#sysvar_explicit_defaults_for_timestamp

    Thank you.
     
  6. Venomous21

    Venomous21 Well-Known Member

    Joined:
    Jun 28, 2012
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I am also receiving the [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details) but mysql appears to be running fine. I just upgraded from 5.5 to 5.6 tonight. Here's my.cnf:

    [mysqld]
    performance-schema=0
    slow-query-log=1
    long-query-time=1
    max_connections=500
    # safe-show-database
    open_files_limit=10000
    innodb_buffer_pool_size=134217728
    max_allowed_packet=268435456
    default-storage-engine=MyISAM
    innodb_file_per_table=1

    Should I definitely add explicit_defaults_for_timestamp=1 ? If I don't, will it cause problems? I read the documentation and find parts of it hard to understand. Appreciate your help. Thanks.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It's not required at this time, but it's a good idea to add the value in the future because of it's deprecation status.

    Thank you.
     
Loading...

Share This Page