Skip to main content

option '--sql_mode' requires an argument

Comments

9 comments

  • cPanelLauren
    Hello, What version of MySQL are you using? What is in the file /etc/my.cnf
    currently? How are you restarting MySQL?
    0
  • grabyourhosting
    Thanks for the reply. I am using the latest mariadb(10.3 I think) and restarting it by using WHM.
    0
  • grabyourhosting
    What's crazy is the other two servers don't do anything like this. Only this server.
    0
  • cPanelLauren
    HI @grabyourhosting It sounds like something changed on this server. Were you able to find the contents of /etc/my.cnf
    ?
    0
  • grabyourhosting
    Yes. It's [mysqld] log-error=/var/lib/mysql/you.yourdomain.com.err performance-schema=on innodb_file_per_table=1 local-infile=0 sql_mode="" innodb_buffer_pool_size=128M innodb_log_file_size=16M open_files_limit=65536 max_allowed_packet=268435456
    0
  • cPanelLauren
    @grabyourhosting Will you remove this line completely? sql_mode=""
    It should use the default SQL Mode when restarting without it.
    0
  • grabyourhosting
    Same Issue. It takes forever to restart it just like before. Here is the full error on the emails I am receiving.
    Notification The service "mysql" appears to be down.
    Service Check Method The system"s command to check or to restart this service failed.
    Number of Restart Attempts 614
    Service Check Raw Output (XID u8jh3f) The "mysql" service is down. The subprocess "/usr/local/cpanel/scripts/restartsrv_mysql" reported error number 255 when it ended.
    Startup Log Aug 11 12:38:44 you.yourdomain.com systemd[1]: Starting MariaDB 10.3.23 database server... Aug 11 12:38:48 you.yourdomain.com mysqld[1117]: 2020-08-11 12:38:48 0 [ERROR] /usr/sbin/mysqld: option '--sql_mode' requires an argument Aug 11 12:38:49 you.yourdomain.com systemd[1]: mysql.service: main process exited, code=exited, status=1/FAILURE Aug 11 12:38:49 you.yourdomain.com systemd[1]: Failed to start MariaDB 10.3.23 database server. Aug 11 12:38:49 you.yourdomain.com systemd[1]: Unit mysql.service entered failed state. Aug 11 12:38:49 you.yourdomain.com systemd[1]: mysql.service failed.
    Memory Information
    Used 3.16 GB
    Available 8.08 GB
    Installed 11.24 GB
    Load Information 1.43 1.47 1.56
    Uptime 2 days, 3 hours, 51 minutes, and 37 seconds
    0
  • grabyourhosting
    Should I open a ticket?
    0
  • grabyourhosting
    It works now. All I had to do is add sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
    0

Please sign in to leave a comment.