|
From: Phil S. <ph...@ca...> - 2023-08-03 14:39:39
|
On 8/3/23 04:05, Graham Dicker via Bacula-users wrote:
> On Thursday, 3 August 2023 08:35:39 BST Graham Dicker via Bacula-users wrote:
>> On Wednesday, 2 August 2023 17:21:49 BST Phil Stracchino wrote:
>>> On 8/2/23 11:12, Graham Dicker via Bacula-users wrote:
>>>> Hello
>>>>
>>>> I am installing Bacula 13.0.2 on Opensuse 15.5 and get this problem when
>>>> I
>>>> run grant_mysql_privileges:
>>>>
>>>> ERROR 1064 (42000) at line 3: 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 '%{db_user}@"%"' at line 1
>>>>
>>>> Database version 10.6.14-MariaDB
>>>>
>>>> I guess it's complaining about the statement
>>>>
>>>> db_user=${db_user:-bacula}
>>>>
>>>> Can anyone help with this please?
>>>
>>> What does the line 'echo "Created MySQL database user: ${db_user}"'
>>> report as the value of ${db_user}?
>>
>> It reports just the single word bacula
>>
>> Graham
> It doesn't actually create the user bacula either although when I run the
> script it says it has created it.
Martin is correct that the second GRANT line is incorrect, it should be
${db_user} not %{db_user}
Try doing this yourself manually. It's not complex. You know your
MariaDB superuser password I assume. Log into MariaDB and run the
following commands:
GRANT ALL PRIVILEGES ON bacula@'HOST' IDENTIFIED BY "password goes here";
GRANT PROCESS ON *.* TO bacula@'HOST';
FLUSH PRIVILEGES;
HOST here can be one of several things. The script uses '%', a wildcard
meaning 'any host'. If your DB runs on the same host as your Director
and will not be accessed from anywhere else, it would be more secure to
use 'localhost' there. Or if you have a subnet behind a firewall and
want to allow access from a range of hosts or all of your hosts, you can
use something like bacula@'1.2.3.%'.
Report any errors.
--
Phil Stracchino
Babylon Communications
ph...@ca...
ph...@co...
Landline: +1.603.293.8485
Mobile: +1.603.998.6958
|