Quantcast

Can't run bacula any more.

classic Classic list List threaded Threaded
79 messages Options
1234
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Sven Hartge-5
On 12.03.2017 17:57, Richard wrote:
> Date: Sunday, March 12, 2017 17:33:40 +0100 From: "Erik P. Olsen" <[hidden email]>
>> On 2017-03-12 at 15:31:35 Sven Hartge wrote:

>>> First step should be to fix the database so that the director
>>> daemon starts correctly and _then_ see if this automagically fixes
>>> the problem with bconsole (I think it will).

>> Yes. The big thing is how to fix it. I have reinstall mariadb,
>> dropped the database and reran the scripts from /usr/libexec/bacula
>> to no avail. Last efford will be to remove mariadb and install
>> mysqld instead.

> I don't believe that this is a mysql/mariadb issue as they are
> basically interchangeable.

I would really be surprised if it is. I am running Bacula on MariaDB
myself with no problems at all. (But I am using Debian, so there may be
a difference on how the RPM packages integrate the different flavors of
MySQL/MariaDB.)

Grüße,
Sven.



------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
In reply to this post by Richard
On 2017-03-12 at 16:57:41 Richard wrote:

> > Date: Sunday, March 12, 2017 17:33:40 +0100
> > From: "Erik P. Olsen" <[hidden email]>
> > To: Sven Hartge <[hidden email]>
> >
> > On 2017-03-12 at 15:31:35 Sven Hartge wrote:
> >  
> >> First step should be to fix the database so that the director
> >> daemon starts correctly and _then_ see if this automagically fixes
> >> the problem with bconsole (I think it will).  
> >  
> > Yes. The big thing is how to fix it. I have reinstall mariadb,
> > dropped the database and reran the scripts from /usr/libexec/bacula
> > to no avail. Last efford will be to remove mariadb and install
> > mysqld instead.
> >  
>
> I don't believe that this is a mysql/mariadb issue as they are
> basically interchangeable. Rather, it appears that one or more of the
> scripts for setting up the bacula db and tables for isn't getting run
> [successfully].
>
> Could you provide a list of the files in your /usr/libexec/bacula/
> directory?
>
>
[root@Erik-PC bacula]# ls
bacula_config               drop_sqlite3_tables
btraceback.dbx              dvd-handler
btraceback.gdb              grant_bacula_privileges
btraceback.mdb              grant_mysql_privileges
create_bacula_database      grant_postgresql_privileges
create_mysql_database       grant_sqlite3_privileges
create_postgresql_database  make_bacula_tables
create_sqlite3_database     make_catalog_backup.pl
delete_catalog_backup       make_mysql_tables
delete_catalogue_backup     make_postgresql_tables
disk-changer                make_sqlite3_tables
drop_bacula_database        mtx-changer
drop_bacula_tables          mtx-changer.conf
drop_mysql_database         update_bacula_tables
drop_mysql_tables           update_mysql_tables
drop_postgresql_database    update_postgresql_tables
drop_postgresql_tables      update_sqlite3_tables
drop_sqlite3_database
[root@Erik-PC bacula]#


--
Erik


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
In reply to this post by Sven Hartge-5
On 2017-03-12 at 19:43:47 Sven Hartge wrote:

> On 12.03.2017 17:57, Richard wrote:
> > Date: Sunday, March 12, 2017 17:33:40 +0100 From: "Erik P. Olsen"
> > <[hidden email]>  
> >> On 2017-03-12 at 15:31:35 Sven Hartge wrote:  
>
> >>> First step should be to fix the database so that the director
> >>> daemon starts correctly and _then_ see if this automagically fixes
> >>> the problem with bconsole (I think it will).  
>
> >> Yes. The big thing is how to fix it. I have reinstall mariadb,
> >> dropped the database and reran the scripts from /usr/libexec/bacula
> >> to no avail. Last efford will be to remove mariadb and install
> >> mysqld instead.  
>
> > I don't believe that this is a mysql/mariadb issue as they are
> > basically interchangeable.  
>
> I would really be surprised if it is. I am running Bacula on MariaDB
> myself with no problems at all. (But I am using Debian, so there may
> be a difference on how the RPM packages integrate the different
> flavors of MySQL/MariaDB.)

And I am running Bacula on mariadb on my other machine also with no
problems at all.

--
Erik
 

 

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
In reply to this post by Sven Hartge-5
On 2017-03-12 at 15:31:35 Sven Hartge wrote:

> On 12.03.2017 14:54, Richard wrote:
>
> > Looking back through all the messages in this thread, it appears
> > that you have two problems. One is that you can't connect to the
> > director daemon:  
>
> > The other is your db setup/access:  
>
> Both problems will be related. He cannot connect to the director with
> bconsole because the director dies because the database is not
> reachable or not setup correctly.
>
> First step should be to fix the database so that the director daemon
> starts correctly and _then_ see if this automagically fixes the
> problem with bconsole (I think it will).
>
I've looked at the mariadb log file. I've found a few lines that look
strange and may contain important info. I've removed some leading
timestamps and other data not relating to the possible error in order
to make more readable:
 
[Warning] InnoDB: New log files created, LSN=3965718
[Note] InnoDB: Highest supported file format is Barracuda.
[Note] InnoDB: 128 rollback segment(s) are active.
[Note] InnoDB: Waiting for purge to start
[Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.34-79.1 started; log sequence number 3965964
[Note] Plugin 'FEEDBACK' is disabled.
[Note] InnoDB: Dumping buffer pool(s) not yet started
[Warning] GSSAPI plugin : default principal 'mariadb/erik-pc.epolan.dk@' not found in keytab
[ERROR] mysqld: Server GSSAPI error (major 851968, minor 2529639093) : gss_acquire_cred failed -Unspecified GSS failure.  Minor code may provide more information. Keytab FILE:/etc/krb5.keytab is nonexistent or empty.
[ERROR] Plugin 'gssapi' init function returned error.
[Note] Server socket created on IP: '0.0.0.0'.
[Note] /usr/libexec/mysqld: ready for connections.
Version: '10.1.21-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
[Note] /usr/libexec/mysqld: Normal shutdown

I hope it makes sense to someone.

--
Erik


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Mike Ruskai
In reply to this post by Erik P. Olsen-3
On 3/12/2017 10:29, Erik P. Olsen wrote:

>
> [snip]
>
> mysql -u bacula
>
> was OK.
>
> show databases;
>
> gave:
>
> +--------------------+
> | Database           |
> +--------------------+
> | information_schema |
> | test               |
> +--------------------+
>
> So apparently the scripts did not create the bacula database. I'll have
> to see why that happened.
>
> Thanks for the information.
>
> --
> Regards,
> Erik P. Olsen, M.Sc. EE
> Solsortvej 30
> DK-2000 Frederiksberg
> Denmark

Is your root DB password blank as well?  Were you logged in as root when
running the scripts?

What do you get if you simply type "mysql" on the command line?  If you
get a prompt, what does "show processlist" report?

If you weren't logged in as root when running the script, with a blank
root DB password, then the DB scripts wouldn't work.

That is, with a secured DB server, this wouldn't work:

/usr/libexec/bacula/create_bacula_database

But this would, provided the password were correct:

/usr/libexec/bacula/create_bacula_database -u root --password=<password>

The scripts don't just fail silently, either.


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
On 2017-03-12 at 18:58:55 Mike Ruskai wrote:

> On 3/12/2017 10:29, Erik P. Olsen wrote:
> >
> > [snip]
> >
> > mysql -u bacula
> >
> > was OK.
> >
> > show databases;
> >
> > gave:
> >
> > +--------------------+
> > | Database           |
> > +--------------------+
> > | information_schema |
> > | test               |
> > +--------------------+
> >
> > So apparently the scripts did not create the bacula database. I'll
> > have to see why that happened.
> >
> > Thanks for the information.
> >
> > --
> > Regards,
> > Erik P. Olsen, M.Sc. EE
> > Solsortvej 30
> > DK-2000 Frederiksberg
> > Denmark  
>
> Is your root DB password blank as well?  Were you logged in as root
> when running the scripts?
Root DB password: don't know. I was using su - when running the scripts.
>
> What do you get if you simply type "mysql" on the command line?  If
> you get a prompt, what does "show processlist" report?


[root@Erik-PC etc]# exit
log ud
[erik@Erik-PC ~]$ mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 722
Server version: 10.1.21-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

>
> If you weren't logged in as root when running the script, with a
> blank root DB password, then the DB scripts wouldn't work.
>
> That is, with a secured DB server, this wouldn't work:
>
> /usr/libexec/bacula/create_bacula_database
>
> But this would, provided the password were correct:
>
> /usr/libexec/bacula/create_bacula_database -u root
> --password=<password>
>
> The scripts don't just fail silently, either.

--
Erik


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
In reply to this post by Erik P. Olsen-3
On 2017-03-12 at 23:06:36 Erik P. Olsen wrote:

> On 2017-03-12 at 15:31:35 Sven Hartge wrote:
>
> > On 12.03.2017 14:54, Richard wrote:
> >  
> > > Looking back through all the messages in this thread, it appears
> > > that you have two problems. One is that you can't connect to the
> > > director daemon:    
> >  
> > > The other is your db setup/access:    
> >
> > Both problems will be related. He cannot connect to the director
> > with bconsole because the director dies because the database is not
> > reachable or not setup correctly.
> >
> > First step should be to fix the database so that the director daemon
> > starts correctly and _then_ see if this automagically fixes the
> > problem with bconsole (I think it will).
> >  
> I've looked at the mariadb log file. I've found a few lines that look
> strange and may contain important info. I've removed some leading
> timestamps and other data not relating to the possible error in order
> to make more readable:
>  
> [Warning] InnoDB: New log files created, LSN=3965718
> [Note] InnoDB: Highest supported file format is Barracuda.
> [Note] InnoDB: 128 rollback segment(s) are active.
> [Note] InnoDB: Waiting for purge to start
> [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.34-79.1
> started; log sequence number 3965964 [Note] Plugin 'FEEDBACK' is
> disabled. [Note] InnoDB: Dumping buffer pool(s) not yet started
> [Warning] GSSAPI plugin : default principal
> 'mariadb/erik-pc.epolan.dk@' not found in keytab [ERROR] mysqld:
> Server GSSAPI error (major 851968, minor 2529639093) :
> gss_acquire_cred failed -Unspecified GSS failure.  Minor code may
> provide more information. Keytab FILE:/etc/krb5.keytab is nonexistent
> or empty. [ERROR] Plugin 'gssapi' init function returned error.
> [Note] Server socket created on IP: '0.0.0.0'.
> [Note] /usr/libexec/mysqld: ready for connections. Version:
> '10.1.21-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306
> MariaDB Server [Note] /usr/libexec/mysqld: Normal shutdown
>
> I hope it makes sense to someone.
>

Did a check of my running bacula system and it had exactly the same
messages - without failing. So this has nothing to do with the failing
system.

--
Erik


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Richard
In reply to this post by Erik P. Olsen-3


> Date: Monday, March 13, 2017 07:40:08 +0100
> From: "Erik P. Olsen" <[hidden email]>
>
> On 2017-03-12 at 18:58:55 Mike Ruskai wrote:
>
>> On 3/12/2017 10:29, Erik P. Olsen wrote:
>> >
>> > [snip]
>> >
>> > mysql -u bacula
>> >
>> > was OK.
>> >
>> > show databases;
>> >
>> > gave:
>> >
>> > +--------------------+
>> > | Database           |
>> > +--------------------+
>> > | information_schema |
>> > | test               |
>> > +--------------------+
>> >
>> > So apparently the scripts did not create the bacula database.
>> > I'll have to see why that happened.
>> >

>> Is your root DB password blank as well?  Were you logged in as root
>> when running the scripts?
> Root DB password: don't know. I was using su - when running the
> scripts.
>>
>> What do you get if you simply type "mysql" on the command line?  If
>> you get a prompt, what does "show processlist" report?
>
>
> [root@Erik-PC etc]# exit
> log ud
> [erik@Erik-PC ~]$ mysql
> Welcome to the MariaDB monitor.  Commands end with ; or \g.
> Your MariaDB connection id is 722
> Server version: 10.1.21-MariaDB MariaDB Server
>
> Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
>
> Type 'help;' or '\h' for help. Type '\c' to clear the current input
> statement.
>
> MariaDB [(none)]>
>
>>
>> If you weren't logged in as root when running the script, with a
>> blank root DB password, then the DB scripts wouldn't work.
>>
>> That is, with a secured DB server, this wouldn't work:
>>
>> /usr/libexec/bacula/create_bacula_database
>>
>> But this would, provided the password were correct:
>>
>> /usr/libexec/bacula/create_bacula_database -u root
>> --password=<password>
>>
>> The scripts don't just fail silently, either.

A slight follow-on. You should invoke mysql as mysql root (mysql -u
root -p [if the password isn't set pressing a CR will get you past
the password prompt]) or after su-ing to system root (and then don't
use the "-u root -p"). Once you have the "mysql>" prompt issue the
"show databases;" command. The output should include the "mysql"
database. If the "bacula" database is also listed that indicates that
it was set up but not permitted to the mysql "bacula" user. If it's
not there (but you see the "mysql" database) that's an indication
that your bacula database creation effort(s) failed.



------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
On 2017-03-13 at 09:15:17 Richard wrote:

> > Date: Monday, March 13, 2017 07:40:08 +0100
> > From: "Erik P. Olsen" <[hidden email]>
> >
> > On 2017-03-12 at 18:58:55 Mike Ruskai wrote:
> >  
> >> On 3/12/2017 10:29, Erik P. Olsen wrote:  
> >> >
> >> > [snip]
> >> >
> >> > mysql -u bacula
> >> >
> >> > was OK.
> >> >
> >> > show databases;
> >> >
> >> > gave:
> >> >
> >> > +--------------------+
> >> > | Database           |
> >> > +--------------------+
> >> > | information_schema |
> >> > | test               |
> >> > +--------------------+
> >> >
> >> > So apparently the scripts did not create the bacula database.
> >> > I'll have to see why that happened.
> >> >  
>
> >> Is your root DB password blank as well?  Were you logged in as root
> >> when running the scripts?  
> > Root DB password: don't know. I was using su - when running the
> > scripts.  
> >>
> >> What do you get if you simply type "mysql" on the command line?  If
> >> you get a prompt, what does "show processlist" report?  
> >
> >
> > [root@Erik-PC etc]# exit
> > log ud
> > [erik@Erik-PC ~]$ mysql
> > Welcome to the MariaDB monitor.  Commands end with ; or \g.
> > Your MariaDB connection id is 722
> > Server version: 10.1.21-MariaDB MariaDB Server
> >
> > Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
> >
> > Type 'help;' or '\h' for help. Type '\c' to clear the current input
> > statement.
> >
> > MariaDB [(none)]>
> >  
> >>
> >> If you weren't logged in as root when running the script, with a
> >> blank root DB password, then the DB scripts wouldn't work.
> >>
> >> That is, with a secured DB server, this wouldn't work:
> >>
> >> /usr/libexec/bacula/create_bacula_database
> >>
> >> But this would, provided the password were correct:
> >>
> >> /usr/libexec/bacula/create_bacula_database -u root
> >> --password=<password>
> >>
> >> The scripts don't just fail silently, either.  
>
> A slight follow-on. You should invoke mysql as mysql root (mysql -u
> root -p [if the password isn't set pressing a CR will get you past
> the password prompt]) or after su-ing to system root (and then don't
> use the "-u root -p"). Once you have the "mysql>" prompt issue the
> "show databases;" command. The output should include the "mysql"
> database. If the "bacula" database is also listed that indicates that
> it was set up but not permitted to the mysql "bacula" user. If it's
> not there (but you see the "mysql" database) that's an indication
> that your bacula database creation effort(s) failed.

With root I got:

+--------------------+
| Database           |
+--------------------+
| bacula             |
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+

--
Erik


 

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Richard
In reply to this post by Erik P. Olsen-3


> Date: Monday, March 13, 2017 12:26:07 +0100
> From: "Erik P. Olsen" <[hidden email]>
>
> On 2017-03-13 at 09:15:17 Richard wrote:
>
>> > Date: Monday, March 13, 2017 07:40:08 +0100
>> > From: "Erik P. Olsen" <[hidden email]>
>> >
>> > On 2017-03-12 at 18:58:55 Mike Ruskai wrote:
>> >  
>> >> On 3/12/2017 10:29, Erik P. Olsen wrote:  
>> >> >
>> >> > [snip]
>> >> >
>> >> > mysql -u bacula
>> >> >
>> >> > was OK.
>> >> >
>> >> > show databases;
>> >> >
>> >> > gave:
>> >> >
>> >> > +--------------------+
>> >> > | Database           |
>> >> > +--------------------+
>> >> > | information_schema |
>> >> > | test               |
>> >> > +--------------------+
>> >> >
>> >> > So apparently the scripts did not create the bacula database.
>> >> > I'll have to see why that happened.
>> >> >  
>>
>> >> Is your root DB password blank as well?  Were you logged in as
>> >> root when running the scripts?  
>> > Root DB password: don't know. I was using su - when running the
>> > scripts.  
>> >>
>> >> What do you get if you simply type "mysql" on the command line?
>> >> If you get a prompt, what does "show processlist" report?  
>> >
>> >
>> > [root@Erik-PC etc]# exit
>> > log ud
>> > [erik@Erik-PC ~]$ mysql
>> > Welcome to the MariaDB monitor.  Commands end with ; or \g.
>> > Your MariaDB connection id is 722
>> > Server version: 10.1.21-MariaDB MariaDB Server
>> >
>> > Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and
>> > others.
>> >
>> > Type 'help;' or '\h' for help. Type '\c' to clear the current
>> > input statement.
>> >
>> > MariaDB [(none)]>
>> >  
>> >>
>> >> If you weren't logged in as root when running the script, with a
>> >> blank root DB password, then the DB scripts wouldn't work.
>> >>
>> >> That is, with a secured DB server, this wouldn't work:
>> >>
>> >> /usr/libexec/bacula/create_bacula_database
>> >>
>> >> But this would, provided the password were correct:
>> >>
>> >> /usr/libexec/bacula/create_bacula_database -u root
>> >> --password=<password>
>> >>
>> >> The scripts don't just fail silently, either.  
>>
>> A slight follow-on. You should invoke mysql as mysql root (mysql -u
>> root -p [if the password isn't set pressing a CR will get you past
>> the password prompt]) or after su-ing to system root (and then
>> don't use the "-u root -p"). Once you have the "mysql>" prompt
>> issue the "show databases;" command. The output should include the
>> "mysql" database. If the "bacula" database is also listed that
>> indicates that it was set up but not permitted to the mysql
>> "bacula" user. If it's not there (but you see the "mysql"
>> database) that's an indication that your bacula database creation
>> effort(s) failed.
>
> With root I got:
>
> +--------------------+
>| Database           |
> +--------------------+
>| bacula             |
>| information_schema |
>| mysql              |
>| performance_schema |
>| test               |
> +--------------------+

Now, as system root:

   mysql bacula

and once at the "MariaDB [bacula]>" prompt:
 
   show tables;

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.

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;

If it now shows the "bacula" database:

   use bacula;    

   show tables;

Ideally you'll see the same list of ~25 tables.

If that works, that should indicate that the obvious bacula table
creation/privileges issue(s) have been resolved, so you should try to
proceed with bacula (where this all started) and see what you get.

You may want to double check the "Catalog" section of your
bacula-dir.conf file (in /etc/bacula) to confirm that the db
credentials line shows:

  dbname = "bacula"; dbuser = "bacula"; dbpassword = ""




------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
On 2017-03-13 at 12:40:52 Richard wrote:

> > Date: Monday, March 13, 2017 12:26:07 +0100
> > From: "Erik P. Olsen" <[hidden email]>
> >
> > On 2017-03-13 at 09:15:17 Richard wrote:
> >  
> >> > Date: Monday, March 13, 2017 07:40:08 +0100
> >> > From: "Erik P. Olsen" <[hidden email]>
> >> >
> >> > On 2017-03-12 at 18:58:55 Mike Ruskai wrote:
> >> >    
> >> >> On 3/12/2017 10:29, Erik P. Olsen wrote:    
> >> >> >
> >> >> > [snip]
> >> >> >
> >> >> > mysql -u bacula
> >> >> >
> >> >> > was OK.
> >> >> >
> >> >> > show databases;
> >> >> >
> >> >> > gave:
> >> >> >
> >> >> > +--------------------+
> >> >> > | Database           |
> >> >> > +--------------------+
> >> >> > | information_schema |
> >> >> > | test               |
> >> >> > +--------------------+
> >> >> >
> >> >> > So apparently the scripts did not create the bacula database.
> >> >> > I'll have to see why that happened.
> >> >> >    
> >>  
> >> >> Is your root DB password blank as well?  Were you logged in as
> >> >> root when running the scripts?    
> >> > Root DB password: don't know. I was using su - when running the
> >> > scripts.    
> >> >>
> >> >> What do you get if you simply type "mysql" on the command line?
> >> >> If you get a prompt, what does "show processlist" report?    
> >> >
> >> >
> >> > [root@Erik-PC etc]# exit
> >> > log ud
> >> > [erik@Erik-PC ~]$ mysql
> >> > Welcome to the MariaDB monitor.  Commands end with ; or \g.
> >> > Your MariaDB connection id is 722
> >> > Server version: 10.1.21-MariaDB MariaDB Server
> >> >
> >> > Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and
> >> > others.
> >> >
> >> > Type 'help;' or '\h' for help. Type '\c' to clear the current
> >> > input statement.
> >> >
> >> > MariaDB [(none)]>
> >> >    
> >> >>
> >> >> If you weren't logged in as root when running the script, with a
> >> >> blank root DB password, then the DB scripts wouldn't work.
> >> >>
> >> >> That is, with a secured DB server, this wouldn't work:
> >> >>
> >> >> /usr/libexec/bacula/create_bacula_database
> >> >>
> >> >> But this would, provided the password were correct:
> >> >>
> >> >> /usr/libexec/bacula/create_bacula_database -u root
> >> >> --password=<password>
> >> >>
> >> >> The scripts don't just fail silently, either.    
> >>
> >> A slight follow-on. You should invoke mysql as mysql root (mysql -u
> >> root -p [if the password isn't set pressing a CR will get you past
> >> the password prompt]) or after su-ing to system root (and then
> >> don't use the "-u root -p"). Once you have the "mysql>" prompt
> >> issue the "show databases;" command. The output should include the
> >> "mysql" database. If the "bacula" database is also listed that
> >> indicates that it was set up but not permitted to the mysql
> >> "bacula" user. If it's not there (but you see the "mysql"
> >> database) that's an indication that your bacula database creation
> >> effort(s) failed.  
> >
> > With root I got:
> >
> > +--------------------+
> >| Database           |
> > +--------------------+
> >| bacula             |
> >| information_schema |
> >| mysql              |
> >| performance_schema |
> >| test               |
> > +--------------------+  
>
> Now, as system root:
>
>    mysql bacula
>
> and once at the "MariaDB [bacula]>" prompt:
>  
>    show tables;
>
> 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".

>
> If it now shows the "bacula" database:
>
>    use bacula;    
>
>    show tables;
>
> Ideally you'll see the same list of ~25 tables.
>
> If that works, that should indicate that the obvious bacula table
> creation/privileges issue(s) have been resolved, so you should try to
> proceed with bacula (where this all started) and see what you get.
>
> You may want to double check the "Catalog" section of your
> bacula-dir.conf file (in /etc/bacula) to confirm that the db
> credentials line shows:
>
>   dbname = "bacula"; dbuser = "bacula"; dbpassword = ""

Yes, this is set in the Catalog section.

I believe I have configured bacula correctly as I have done so many
times without problems and I have not modified the scripts at all. So
to my understanding it should just work first time.

--
Erik


 

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Richard
In reply to this post by Erik P. Olsen-3


> Date: Monday, March 13, 2017 14:07:04 +0100
> From: "Erik P. Olsen" <[hidden email]>
>
> 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?




------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
On 2017-03-13 at 13:38:44 Richard wrote:

> > Date: Monday, March 13, 2017 14:07:04 +0100
> > From: "Erik P. Olsen" <[hidden email]>
> >
> > 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.

--
Erik




------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
On 2017-03-13 at 11:46:52 Wanderlei Huttel wrote:
Hello Wanderlei,

[root@Erik-PC bacula]# ./grant_mysql_privileges -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Error creating privileges.
[root@Erik-PC bacula]#

--
Erik

> Hello Erik
>
> Run the command informing user and password (just -p) then the prompt
> will ask for your password.
> ./grant_mysql_privileges -u root -p
>
>
> Best regards
>
> *Wanderlei Hüttel*
> http://www.huttel.com.br
>
> 2017-03-13 11:34 GMT-03:00 Erik P. Olsen <[hidden email]>:
>
> > On 2017-03-13 at 13:38:44 Richard wrote:
> >  
> > > > Date: Monday, March 13, 2017 14:07:04 +0100
> > > > From: "Erik P. Olsen" <[hidden email]>
> > > >
> > > > 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.
> >
> > --
> > Erik
> >
> >
> >
> >
> > ------------------------------------------------------------
> > ------------------
> > 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
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/bacula-users
> >  

 

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Richard
In reply to this post by Erik P. Olsen-3


------------ Original Message ------------

> Date: Monday, March 13, 2017 15:34:04 +0100
> From: "Erik P. Olsen" <[hidden email]>
>
> On 2017-03-13 at 13:38:44 Richard wrote:
>
>> > Date: Monday, March 13, 2017 14:07:04 +0100
>> > From: "Erik P. Olsen" <[hidden email]>
>> >
>> > 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
On 2017-03-13 at 16:07:35 Richard wrote:

> ------------ Original Message ------------
> > Date: Monday, March 13, 2017 15:34:04 +0100
> > From: "Erik P. Olsen" <[hidden email]>
> >
> > On 2017-03-13 at 13:38:44 Richard wrote:
> >  
> >> > Date: Monday, March 13, 2017 14:07:04 +0100
> >> > From: "Erik P. Olsen" <[hidden email]>
> >> >
> >> > 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.]


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:
           Select_priv: N
           Insert_priv: N
           Update_priv: N
           Delete_priv: N
           Create_priv: N
             Drop_priv: N
           Reload_priv: N
         Shutdown_priv: N
          Process_priv: N
             File_priv: N
            Grant_priv: N
       References_priv: N
            Index_priv: N
            Alter_priv: N
          Show_db_priv: N
            Super_priv: N
 Create_tmp_table_priv: N
      Lock_tables_priv: N
          Execute_priv: N
       Repl_slave_priv: N
      Repl_client_priv: N
      Create_view_priv: N
        Show_view_priv: N
   Create_routine_priv: N
    Alter_routine_priv: N
      Create_user_priv: N
            Event_priv: N
          Trigger_priv: N
Create_tablespace_priv: N
              ssl_type:
            ssl_cipher:
           x509_issuer:
          x509_subject:
         max_questions: 0
           max_updates: 0
       max_connections: 0
  max_user_connections: 0
                plugin:
 authentication_string:
      password_expired: N
               is_role: N
          default_role:
    max_statement_time: 0.000000
1 row in set (0.00 sec)

>
> and:
>
>    select * from db where User='bacula' \G

MariaDB [mysql]> select * from db where User='bacula' \G
*************************** 1. row ***************************
                 Host: %
                   Db: bacula
                 User: bacula
          Select_priv: Y
          Insert_priv: Y
          Update_priv: Y
          Delete_priv: Y
          Create_priv: Y
            Drop_priv: Y
           Grant_priv: N
      References_priv: Y
           Index_priv: Y
           Alter_priv: Y
Create_tmp_table_priv: Y
     Lock_tables_priv: Y
     Create_view_priv: Y
       Show_view_priv: Y
  Create_routine_priv: Y
   Alter_routine_priv: Y
         Execute_priv: Y
           Event_priv: Y
         Trigger_priv: Y
1 row in set (0.00 sec)


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

--
Erik


 

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Richard



> Date: Monday, March 13, 2017 23:30:36 +0100
> From: "Erik P. Olsen" <[hidden email]>
>
> On 2017-03-13 at 16:07:35 Richard wrote:
>
>> > Date: Monday, March 13, 2017 15:34:04 +0100
>> > From: "Erik P. Olsen" <[hidden email]>
>> >
>> > 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
On 2017-03-13 at 22:52:04 Richard wrote:

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

 
In my script the lines are:

use mysql
grant all privileges on ${db_name}.* to ${db_user}@localhost ${pass} ${ssl_options};
grant all privileges on ${db_name}.* to ${db_user}@"%" ${pass} ${ssl_options};
select * from user;
flush privileges;

Ups, I now see that a semicolon is missing after "use mysql".
I'll add it and rerun the script:
Oh it won't let me do the "use mysql;" Access denied.

--
Erik

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Dan Langille
> On Mar 14, 2017, at 2:42 AM, Erik P. Olsen <[hidden email]> wrote:
>
> On 2017-03-13 at 22:52:04 Richard wrote:
>
>> 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};
>
>
> In my script the lines are:
>
> use mysql
> grant all privileges on ${db_name}.* to ${db_user}@localhost ${pass} ${ssl_options};
> grant all privileges on ${db_name}.* to ${db_user}@"%" ${pass} ${ssl_options};
> select * from user;
> flush privileges;
>
> Ups, I now see that a semicolon is missing after "use mysql".
> I'll add it and rerun the script:
> Oh it won't let me do the "use mysql;" Access denied.


Perhaps connect to mysql using the user name / password you have in the Catalog definition.
--
Dan Langille - BSDCan / PGCon
[hidden email]



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
On 2017-03-15 at 21:17:07 Dan Langille wrote:

> > On Mar 14, 2017, at 2:42 AM, Erik P. Olsen <[hidden email]> wrote:
> >
> > On 2017-03-13 at 22:52:04 Richard wrote:
> >  
> >> 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};  
> >
> >
> > In my script the lines are:
> >
> > use mysql
> > grant all privileges on ${db_name}.* to ${db_user}@localhost ${pass} ${ssl_options};
> > grant all privileges on ${db_name}.* to ${db_user}@"%" ${pass} ${ssl_options};
> > select * from user;
> > flush privileges;
> >
> > Ups, I now see that a semicolon is missing after "use mysql".
> > I'll add it and rerun the script:
> > Oh it won't let me do the "use mysql;" Access denied.  
>
>
> Perhaps connect to mysql using the user name / password you have in the Catalog definition.


[erik@Erik-PC ~]$ mysql bacula --user=bacula
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'bacula'
[erik@Erik-PC ~]$

I am afraid it will never work :-(

--
Erik
 
 

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
1234
Loading...