Bacula-users

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

2017-03-13 12:08:31
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 16:07:35 +0000

------------ Original Message ------------
> 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:
> 
>> > Date: Monday, March 13, 2017 14:07:04 +0100
>> > From: "Erik P. Olsen" <epodata AT gmail DOT com>
>> > 
>> > On 2017-03-13 at 12:40:52 Richard wrote:
>> >   
>> >> If it shows a list of the ~25+ tables (likely ending with
>> >> "Version"), then exit mysql/mariadb and (still as system root)
>> >> run the "grant_mysql_privileges" script that's in your
>> >> /usr/libexec/bacula/ directory.  
>> > 
>> > Yes, I see 26 rows ending with Version.
>> >   
>> >> 
>> >> After doing that, then as a normal (non-root) system user, do:
>> >> 
>> >>    mysql -u bacula 
>> >> 
>> >>    [i don't believe that a password is set, but you can look at
>> >>    the    top of the grant script to confirm this.]
>> >> 
>> >>    show databases;  
>> > 
>> > Unfortunately does not show "bacula".
>> >   
>> 
>> 
>> 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.]

and:

   select * from db where User='bacula' \G

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".
   



------------------------------------------------------------------------------
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