Bacula-users

Re: [Bacula-users] Can't run bacula any more.

2017-03-13 18:53:01
Subject: Re: [Bacula-users] Can't run bacula any more.
From: Richard <lists-bacula AT listmail.innovate DOT net>
To: bacula-users AT lists.sourceforge DOT net
Date: Mon, 13 Mar 2017 22:52:04 +0000


> Date: Monday, March 13, 2017 23:30:36 +0100
> From: "Erik P. Olsen" <epodata AT gmail DOT com>
>
> On 2017-03-13 at 16:07:35 Richard wrote:
> 
>> > Date: Monday, March 13, 2017 15:34:04 +0100
>> > From: "Erik P. Olsen" <epodata AT gmail DOT com>
>> > 
>> > On 2017-03-13 at 13:38:44 Richard wrote:
>> >   
>> >> 
>> >> When you ran the "grant_mysql_privileges" script did it give a
>> >> multi-column display of settings, with something like
>> >> "Privileges for user ..." at the bottom? If so, could you
>> >> confirm the user/db information on that line (you can rerun the
>> >> script without having to take any other actions). If not, what
>> >> type of output (if any) did you get?  
>> > 
>> > These are the first few lines:
>> > 
>> > [root@Erik-PC bacula]# ./grant_mysql_privileges
>> > Created MySQL database user: bacula
>> > ERROR 1133 (28000) at line 2: Can't find any matching row in the
>> > user table Host    User    Password        Select_priv
>> > Insert_priv        Update_priv     Delete_priv
>> > Create_priv        Drop_priv       Reload_priv     Shutdown_priv
>> > 
>> > And this is the last:
>> > 
>> > Privileges for user bacula granted on database bacula.  
>> 
>> To see if that last line is accurate or not (and whether that error
>> is spurious), as root (either system or mysql), at the "MariaDB
>> [(none)]>" prompt:  
>> 
>>    use mysql;
>>    select * from user where User='bacula' \G
>>  
>> [note, end that command with an uppercase "\G", that will display
>> the output in a list, rather than a table.]
> 
> 
> MariaDB [(none)]> use mysql;
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
> 
> Database changed
> MariaDB [mysql]> select * from user where User='bacula' \G
> *************************** 1. row ***************************
>                   Host: %
>                   User: bacula
>               Password: 
    . . .
>> 
>> and:
>> 
>>    select * from db where User='bacula' \G
> 
> MariaDB [mysql]> select * from db where User='bacula' \G
> *************************** 1. row ***************************
>                  Host: %
>                    Db: bacula
>                  User: bacula
    . . .
> 
> 
>> 
>> The first should show two records - both for User "bacula", but one
>> for Host "%" and one for "localhost" -- with (most) everything set
>> to "N". 
>> 
>> The second should also show two records, same Host and User values
>> and Db "bacula", but with everything (except the "Grant" privilege)
>> set to "Y".
> 
> There doesn't seem to be one for "localhost".

What you have for privileges is what I would expect. My
"grant_mysql_privileges" script has two lines - the first will do the
"localhost" setup for the bacula user. Assuming that your script is
lacking that, you might want to add it and try rerunning the script.

 grant all privileges on ${db_name}.* to ${db_user}@localhost ${pass};
 grant all privileges on ${db_name}.* to ${db_user}@"%" ${pass};




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users