{"id":733,"date":"2016-02-27T11:06:54","date_gmt":"2016-02-26T23:06:54","guid":{"rendered":"http:\/\/mdickinson.dyndns.org\/php\/wordpress\/?p=733"},"modified":"2016-02-27T11:06:54","modified_gmt":"2016-02-26T23:06:54","slug":"f21-to-f23-upgrade-issue-1-bacula-upgrade","status":"publish","type":"post","link":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/?p=733","title":{"rendered":"F21 to F23 upgrade, issue 1, bacula upgrade"},"content":{"rendered":"<p>The bacula upgrade script fails for mariadb (and I assume mysql) databases that are running in the recomended &#8216;safe mode&#8217;.<\/p>\n<p>The script <b>\/usr\/libexec\/bacula\/update_bacula_tables mysql<\/b> (basically runs update_mysql_tables) fails with the error<br \/>\n<em>You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column<\/em><\/p>\n<p>Fortunately it is the last step in the upgrade script, only the command below fails.<\/p>\n<pre>\r\nMariaDB [bacula]> UPDATE Version SET VersionId=15;\r\nERROR 1175 (HY000): You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column\r\n<\/pre>\n<p>And the workaround is simple<\/p>\n<pre>\r\nMariaDB [bacula]> SET SQL_SAFE_UPDATES = 0;\r\nQuery OK, 0 rows affected (0.00 sec)\r\n\r\nMariaDB [bacula]> UPDATE Version SET VersionId=15;\r\nQuery OK, 1 row affected (0.04 sec)\r\nRows matched: 1  Changed: 1  Warnings: 0\r\n                                                                               \r\nUPDATE Version SETSET SQL_SAFE_UPDATES = 1;\r\nQuery OK, 0 rows affected (0.00 sec)\r\n\r\nMariaDB [bacula]>quit\r\n\r\n[root@server7]# service mariadb restart\r\n<\/pre>\n<p>Now, an issue would be that at no point does it prompt for a userid or password.<\/p>\n<p>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&#8230; well that is fixed now; have run the mysql_secure_installation script which should have been run ages ago.<\/p>\n<p>Which tends to imply that with a password set on the root mariadb user the script would fail anyway. <\/p>\n<p>But as bacula is the best <em>free<\/em> 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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The bacula upgrade script fails for mariadb (and I assume mysql) databases that are running in the recomended &#8216;safe mode&#8217;. 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 &hellip; <a href=\"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/?p=733\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-733","post","type-post","status-publish","format-standard","hentry","category-my-nux-thoughts-and-notes"],"_links":{"self":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/733","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=733"}],"version-history":[{"count":1,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/733\/revisions"}],"predecessor-version":[{"id":734,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/733\/revisions\/734"}],"wp:attachment":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}