Bacula-users

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

2017-03-12 09:55:58
Subject: Re: [Bacula-users] Can't run bacula any more.
From: Richard <lists-bacula AT listmail.innovate DOT net>
To: Bacula <bacula-users AT lists.sourceforge DOT net>
Date: Sun, 12 Mar 2017 13:54:37 +0000

> Date: Sunday, March 12, 2017 11:53:57 +0100
> From: "Erik P. Olsen" <epodata AT gmail DOT com>
> To: Kern Sibbald <kern AT sibbald DOT com>
>
> Hello Kern,
> 
> I've read the manual numerous times and followed the instructions
> again and again.
> 
> mysql mysql
>> select * from user;
> 
> works OK, so I assume everything is OK with the database and the
> access privileges. There seems nothing I can do other than continue
> taking backups from my old desktop which for other reasons is not
> advisable.
> 

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:

   bconsole: bsock.c:278-0 Could not connect to server Director
   daemon 192.168.1.36:9101. ERR=Connection refused

You likely need to fix the configuration in your bacula bconsole.conf
file.


The other is your db setup/access:

   Error 1044 (42000): Access denied for user ''@'localhost' to 
   database 'bacula' bacula-dir: dird.c:969-0 Could not open
   Catalog "MyCatalog", database "bacula"


The sequence that you have tried:

   > mysql mysql
   >> select * from user;

doesn't tell you much of anything related to bacula. The "mysql" db
and "user" table are part of the mysql basic setup so will always be
there if you have mysql/mariadb installed and configured.

What you need to test for bacula is the existence of the db "bacula"
and (access to the) tables within that.

Start with the command:

   mysql -h <dbhost> -u bacula

[if you have changed the defaults in the "Catalog" section of your
bacula-dir.conf you will need to make the necessary adjustments to
the above.]

from the machine where you have the bacula-sd installed. If they are
all on the same (new) machine, then the "-h <dbhost>" part is
unnecessary.

This should get you the mysql herald and "mysql>" prompt. Assuming it
does, issue the command:

   show databases;

that should give you a list that includes "bacula". Assuming so, then:

   use bacula;
and:
   show tables;

Assuming no errors, the last command should give you a list of 20+
tables. Try issuing a:

   select * from <tablename>; 

for any of them [e.g., "Client" or "Job"). Given that you haven't
done any backups yet they should be empty, but being able to read a
table goes somewhat to the access issue. You should also try
inserting a (minimal) record into one of the tables to see if you
have write access. You'll want to delete it if successful.

If any of this fails, try:

   use mysql;
   select * from user where User="bacula";

and let us know what gets returned.

Based on the results we can suggest further actions.



------------------------------------------------------------------------------
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
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users