You need to sign in or sign up before continuing.
  • Monty's avatar
    Fixed that mysql_upgrade doesn't give errors about mariadb.sys · c4ebb2bd
    Monty authored
    The reason for this fix was that when I tried to run mysql_upgrade
    at home to update an old 10.5 installation, mysql_upgrade failed
    with warnings about mariadb.sys user not existing.
    
    If the server was started with --skip-grants, there would be no warnings
    from mysql_upgrade, but in some cases running mysql_upgrade again could
    produce new warnings.
    
    The reason for the warnings was that any access of the mysql.user view
    will produce a warning if the mariadb.sys user does not exists.
    
    Fixed with the following changes:
    - Disable warnings about mariadb.sys user not existing
    - Don't overwrite old mariadb.sys entries in tables_priv and global_priv
    - Ensure that tables_priv has an entry for mariadb.sys if the user exists.
      This fixes an issue that tables_priv would not be updated if there
      was a failure directly after global_priv was updated.
    c4ebb2bd
mysql_system_tables.sql 29.3 KB