[MDEV-18753] mysql user identified via unix_socket and given full mysql privileges is receiving Error 'Could not create the upgrade info file '/var/lib/mysql/mysql_upgrade_info' in the MariaDB 'upon mysql_upgrade Created: 2019-02-27  Updated: 2019-05-21  Resolved: 2019-05-21

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.4.3
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Zdravelina Sokolovska (Inactive) Assignee: Sergei Golubchik
Resolution: Not a Bug Votes: 0
Labels: upstream


 Description   

mysql user FF is identified via unix_socket
and is given full mysql privileges, but user is receiving Error
'Could not create the upgrade info file '/var/lib/mysql/mysql_upgrade_info' in the MariaDB '
when perform mysql_upgrade

mysql user given with full / or appropriate mysql privileges should not receive permission Errors from mysql service

 mysql_upgrade -u FF --force
Phase 1/7: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats                                 OK
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.global_priv                                  OK
mysql.gtid_slave_pos                               OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.index_stats                                  OK
mysql.innodb_index_stats                           OK
mysql.innodb_table_stats                           OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.proxies_priv                                 OK
mysql.roles_mapping                                OK
mysql.servers                                      OK
mysql.table_stats                                  OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.transaction_registry                         OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
mysql.user                                         OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
Processing databases
information_schema
performance_schema
rr
rr.a                                               OK
Phase 7/7: Running 'FLUSH PRIVILEGES'
OK
Could not create the upgrade info file '/var/lib/mysql/mysql_upgrade_info' in the MariaDB Servers datadir, errno: 13
 

MariaDB [(none)]> select * from mysql.user where User='FF' \G
*************************** 1. row ***************************
                  Host: %
                  User: FF
              Password:
           Select_priv: Y
           Insert_priv: Y
           Update_priv: Y
           Delete_priv: Y
           Create_priv: Y
             Drop_priv: Y
           Reload_priv: Y
         Shutdown_priv: Y
          Process_priv: Y
             File_priv: Y
            Grant_priv: Y
       References_priv: Y
            Index_priv: Y
            Alter_priv: Y
          Show_db_priv: Y
            Super_priv: Y
 Create_tmp_table_priv: Y
      Lock_tables_priv: Y
          Execute_priv: Y
       Repl_slave_priv: Y
      Repl_client_priv: Y
      Create_view_priv: Y
        Show_view_priv: Y
   Create_routine_priv: Y
    Alter_routine_priv: Y
      Create_user_priv: Y
            Event_priv: Y
          Trigger_priv: Y
Create_tablespace_priv: Y
   Delete_history_priv: Y
              ssl_type:
            ssl_cipher:
           x509_issuer:
          x509_subject:
         max_questions: 0
           max_updates: 0
       max_connections: 0
  max_user_connections: 0
                plugin: unix_socket
 authentication_string:
      password_expired: N
               is_role: N
          default_role:
    max_statement_time: 0.000000
1 row in set (0.001 sec)
 



 Comments   
Comment by Elena Stepanova [ 2019-02-27 ]

It's a file system error, it has nothing to do with the database privileges. The system user running mysql_upgrade should have write access to /var/lib/mysql.

Generated at Thu Feb 08 08:46:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.