Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

mysql crash! TIMESTAMP with implicit DEFAULT value is deprecated.

Discussion in 'Database Discussion' 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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,826
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

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

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,826
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.6/en/server-system-variables.html#sysvar_explicit_defaults_for_timestamp

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Venomous21

    Venomous21 Well-Known Member

    Joined:
    Jun 28, 2012
    Messages:
    84
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,826
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice