Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Incomplete
-
10.6.7
-
None
-
RHEL 3.10.0-1160.25.1.el7.x86_64
Description
Was performing an upgrade from Mariadb 10.2.15 to 10.6.7, by first completely unistalling and then installing the upgraded version:
yum remove MariaDB-server MariaDB-client
yum clean all
yum install MariaDB-server MariaDB-client
Proceeded to start mariadb service:
systemctl start mariadb
Run upgrade:
sudo mysql_upgrade -uroot -p
Got the following errors:
sys.x$waits_by_host_by_latency OK
sys.x$waits_by_user_by_latency OK
sys.x$waits_global_by_latency OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
ERROR 1449 (HY000) at line 32: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 41: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 84: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 93: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 111: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 197: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 206: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 208: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 219: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 224: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 227: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 353: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 356: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 425: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 430: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 432: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 435: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 439: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 444: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 465: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 473: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1 (HY000) at line 553: Can't create/write to file '/tmp/#sql-temptable-4c02-12-195.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 567: Can't create/write to file '/tmp/#sql-temptable-4c02-12-197.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 568: Can't create/write to file '/tmp/#sql-temptable-4c02-12-198.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 570: Can't create/write to file '/tmp/#sql-temptable-4c02-12-199.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 629: Can't create/write to file '/tmp/#sql-temptable-4c02-12-19a.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 757: Can't create/write to file '/tmp/#sql-temptable-4c02-12-19c.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 787: Can't create/write to file '/tmp/#sql-temptable-4c02-12-1a1.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 2287: Can't create/write to file '/tmp/#sql-temptable-4c02-12-1b0.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 2306: Can't create/write to file '/tmp/#sql-temptable-4c02-12-1b1.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 2451: Can't create/write to file '/tmp/#sql-temptable-4c02-12-1b7.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 2476: Can't create/write to file '/tmp/#sql-temptable-4c02-12-1b8.MAI' (Errcode: 13 "Permission denied")
Reading from other similar issues, attempted to fix the definer does not exist by running the following commands:
insert into mysql.global_priv values ('localhost','mariadb.sys','{"access":0,"plugin":"mysql_native_password","authentication_string":"","account_locked":true,"password_last_changed":0}');
GRANT ALL PRIVILEGES ON . TO 'mariadb.sys'@'localhost' WITH GRANT OPTION;
flush privileges;
Re-running mysql upgrade, see the permission denied errors only:
sys.x$wait_classes_global_by_avg_latency OK
sys.x$wait_classes_global_by_latency OK
sys.x$waits_by_host_by_latency OK
sys.x$waits_by_user_by_latency OK
sys.x$waits_global_by_latency OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
ERROR 1 (HY000) at line 553: Can't create/write to file '/tmp/#sql-temptable-4dfb-a-100.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 567: Can't create/write to file '/tmp/#sql-temptable-4dfb-a-102.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 568: Can't create/write to file '/tmp/#sql-temptable-4dfb-a-103.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 570: Can't create/write to file '/tmp/#sql-temptable-4dfb-a-104.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 629: Can't create/write to file '/tmp/#sql-temptable-4dfb-a-105.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 757: Can't create/write to file '/tmp/#sql-temptable-4dfb-a-107.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 787: Can't create/write to file '/tmp/#sql-temptable-4dfb-a-10c.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 2287: Can't create/write to file '/tmp/#sql-temptable-4dfb-a-11b.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 2306: Can't create/write to file '/tmp/#sql-temptable-4dfb-a-11c.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 2451: Can't create/write to file '/tmp/#sql-temptable-4dfb-a-122.MAI' (Errcode: 13 "Permission denied")
ERROR 1 (HY000) at line 2476: Can't create/write to file '/tmp/#sql-temptable-4dfb-a-123.MAI' (Errcode: 13 "Permission denied")
FATAL ERROR: Upgrade failed
Here are the privileges for /tmp:
[root@xsdclxmdndb001 hscadmin]$ namei -om /tmp
f: /tmp
dr-xr-xr-x root root /
drwxrwxrwt root root tmp