F21 to F23 upgrade, issue 1, bacula upgrade

The bacula upgrade script fails for mariadb (and I assume mysql) databases that are running in the recomended ‘safe mode’.

The script /usr/libexec/bacula/update_bacula_tables mysql (basically runs update_mysql_tables) fails with the error
You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

Fortunately it is the last step in the upgrade script, only the command below fails.

MariaDB [bacula]> UPDATE Version SET VersionId=15;
ERROR 1175 (HY000): You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

And the workaround is simple

MariaDB [bacula]> SET SQL_SAFE_UPDATES = 0;
Query OK, 0 rows affected (0.00 sec)

MariaDB [bacula]> UPDATE Version SET VersionId=15;
Query OK, 1 row affected (0.04 sec)
Rows matched: 1  Changed: 1  Warnings: 0
                                                                               
UPDATE Version SETSET SQL_SAFE_UPDATES = 1;
Query OK, 0 rows affected (0.00 sec)

MariaDB [bacula]>quit

[root@server7]# service mariadb restart

Now, an issue would be that at no point does it prompt for a userid or password.

It did highlight a rather major point that I had omitted to set a root password for mariadb on my bacula backup server, all the users had one but forgetting root… well that is fixed now; have run the mysql_secure_installation script which should have been run ages ago.

Which tends to imply that with a password set on the root mariadb user the script would fail anyway.

But as bacula is the best free file level backup tool I have ever come across for linux I can live with the inconvenience of having it break every time a yum/dnf update upgrades it to a new version; but it is a pain.

About mark

At work, been working on Tandems for around 30yrs (programming + sysadmin), plus AIX and Solaris sysadmin also thrown in during the last 20yrs; also about 5yrs on MVS (mainly operations and automation but also smp/e work). At home I have been using linux for decades. Programming background is commercially in TAL/COBOL/SCOBOL/C(Tandem); 370 assembler(MVS); C, perl and shell scripting in *nix; and Microsoft Macro Assembler(windows).
This entry was posted in Unix. Bookmark the permalink.