On 5/31/21 3:22 PM, Humphrey Bryant via Bacula-users wrote:
> Hi All,
> 
> I had a perfectly good Bacula 9.6.6 Server and upgraded Bacula 9.6.6 to
> the new Bacula 11.03 and now my bacula-dir will not start. 🙁 Also the
> database upgrade was not done automatically even though I used
> slanesh-Bacula REPO to do the upgrade. I tried updating the database
> manually by running the scripts provided, I'm getting the following error:
> ERROR 1064 (42000) at line 9: You have an error in your SQL syntax;
> check the manual that corresponds to your MariaDB server version for the
> right syntax to use near 'IF EXISTS JobId on File' at line 1
> Update of Bacula MySQL tables from 16 to 1017 failed.
> 
> Please see full details below when I run the command to manually update
> the database.
> I am currently using MariDB as my database ( I never had any issues with
> it until now)
> 
> root@baculaserver bacula]# ./update_mysql_tables -u root -p
>  
> This script will update a Bacula MySQL database
>  from any from version 12-15 or 1014-1021 to version 1022
>  which is needed to convert from any Bacula Enterprise
>  version 4.0.x or later to version 12.4.x
>  or Bacula Community versions 5.0.x, 5.2.x, 7.4.x, 9.x.x to
>  Community version 11.0
>  
> Depending on the current version of your catalog, you may
>  have to run this script multiple times
>  
> Enter password:
> Enter password:
> ERROR 1064 (42000) at line 9: You have an error in your SQL syntax;
> check the manual that corresponds to your MariaDB server version for the
> right syntax to use near 'IF EXISTS JobId on File' at line 1
> Update of Bacula MySQL tables from 16 to 1017 failed.



Humphrey,
Actually, there is no point to that DROP INDEX operation, because the
entire table is going to be dropped after its replacement is rebuilt anyway.

What you can (and probably should) do is find the following two lines:

DROP INDEX IF EXISTS JobId on File;
DROP INDEX IF EXISTS JobId_2 on File;

And, frankly, just delete them.  They serve no purpose.

If you prefer to have those indexes dropped anyway in the script, then
just delete the words 'IF EXISTS' from these two lines ONLY.  The reason
they are there is probably a copy-paste error on my part.


-- 
  Phil Stracchino
  Babylon Communications
  ph...@caerllewys.net
  p...@co.ordinate.org
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to