[MDEV-15207] mysql_upgrade cannot create file mysql_upgrade_info Created: 2018-02-05 Updated: 2023-09-14 Resolved: 2020-07-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Packaging, Scripts & Clients |
| Affects Version/s: | 10.1, 10.2, 10.3 |
| Fix Version/s: | 10.1.46, 10.2.33, 10.3.24, 10.4.14, 10.5.5 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| 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. |
| Comments |
| Comment by Daniel Black [ 2018-02-05 ] |
|
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. |
| Comment by Muhammad Irfan [ 2020-02-11 ] |
|
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 |
| Comment by Oleksandr Byelkin [ 2020-07-09 ] |
|
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) |
| Comment by Ian Gilfillan [ 2020-07-23 ] |
|
PR not being automatically linked for some reason, but have created a link manually, |