Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-15207

mysql_upgrade cannot create file mysql_upgrade_info

Details

    Description

      Our upgrade tests run mysql_upgrade -uroot without sudo (which shouldn't be necessary, since authentication doesn't use unix_socket plugin). It does the job all right, but at the end it complains about not being able to create /var/lib/mysql/mysql_upgrade_info. It doesn't make it fail, though.

      I didn't try to reproduce it manually, but I expect it should be the same.

      Maybe it's just a documentation issue and it's supposed to be always run under sudo.

      No information about 10.0.

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment -

            Maybe the info should be in a mysql.schema_version table with a single row and column. This is the way application schema versions tend to be managed, at least alembic (python) when I used that. This would survive database sql backups and not require root/mysql user privs to mysql_upgrade_info.

            danblack Daniel Black added a comment - Maybe the info should be in a mysql.schema_version table with a single row and column. This is the way application schema versions tend to be managed, at least alembic (python) when I used that. This would survive database sql backups and not require root/mysql user privs to mysql_upgrade_info.

            There are quite few upstream exists similar to this e.g. https://bugs.mysql.com/bug.php?id=37169 https://bugs.mysql.com/bug.php?id=69482

            muhammad.irfan Muhammad Irfan added a comment - There are quite few upstream exists similar to this e.g. https://bugs.mysql.com/bug.php?id=37169 https://bugs.mysql.com/bug.php?id=69482

            Yes, it have to be documented in https://mariadb.com/kb/en/mysql_upgrade/ and the man page of mysql_upgrade starting from 10.1 version (man/mysql_upgrade.1).

            1) it will write to data directory and so have to be run with apropriate rights (the user from which server run)

            2) there is no a word about mysql_upgrade_info in https://mariadb.com/kb/en/mysql_upgrade/ (but it mentioned in man page)

            sanja Oleksandr Byelkin added a comment - Yes, it have to be documented in https://mariadb.com/kb/en/mysql_upgrade/ and the man page of mysql_upgrade starting from 10.1 version (man/mysql_upgrade.1). 1) it will write to data directory and so have to be run with apropriate rights (the user from which server run) 2) there is no a word about mysql_upgrade_info in https://mariadb.com/kb/en/mysql_upgrade/ (but it mentioned in man page)
            greenman Ian Gilfillan added a comment -

            PR not being automatically linked for some reason, but have created a link manually,

            greenman Ian Gilfillan added a comment - PR not being automatically linked for some reason, but have created a link manually,

            People

              greenman Ian Gilfillan
              elenst Elena Stepanova
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.