SOLVED: Mysqldump issues after upgrade to 5.7

Discussion in 'Server Operation' started by Ovidiu, Apr 13, 2016.

  1. Ovidiu

    Ovidiu Active Member

    The script I run:
    Code:
    #!/bin/bash
    #Dump new files
    USER=root
    PASSWORD=XXX
    HOST=localhost
    
    for i in $(echo 'SHOW DATABASES;' | mysql --login-path=.mylogin.cnf|grep -v '^Database$'); do
      mysqldump                                                     \
      --login-path=.mylogin.cnf                                   \
      -Q -c -C --add-drop-table --add-locks --quick --single-transaction   \
      $i > /root/mysql_backup/$i.sql;
    done;
    
    The errors I see:
    Code:
    mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `GLOBAL_STATUS`': The 'INFORMATION_SCHEMA.GLOBAL_STATUS' feature is disabled; see the documentation for 'show_compatibility_56' (3167)
    Not sure how to fix or adapt my script. Not much Mysql experiences here :-(
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    MySQL 7 is much more strict regarding sql syntax and features, so it is not 100% compatible to older releases by default.

    Take a look at the MySQL my.cnf file, if you have a setting for sql_mode then try this:

    sql_mode=NO_ENGINE_SUBSTITUTION

    if this settings contains STRICT_TRANS_TABLES, then many applications that are build for older MySQL versions can fail.
     
  3. Ovidiu

    Ovidiu Active Member

    Thanks, forgot to mention that I had found sql_mode=NO_ENGINE_SUBSTITUTION already by googling so that is fixed.
    What exactly do you mean by
    ? What do I need to check?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Just ensure that this is not set in the sql_mode line.
     
  5. Ovidiu

    Ovidiu Active Member

Share This Page