Bacula-users

Re: [Bacula-users] bacula.db missing

2009-04-15 05:55:25
Subject: Re: [Bacula-users] bacula.db missing
From: "Chandranshu ." <chandranshu AT gmail DOT com>
To: Bacula Users <bacula-users AT lists.sourceforge DOT net>
Date: Wed, 15 Apr 2009 15:19:32 +0530
Hi Craig,

I was already using the -d100 flag :)

However, this time I took a more radical approach and modified the code in src/cats/mysql.c to print the error message returned by mysql_error(). Then, I compiled and ran the code to see the most dubious error in my DBA career:
Error 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

To my utter surprise, someone had changed the /etc/my.cnf file to use /tmp/mysql.sock as the socket file. I reverted the socket file and everything was back on track immediately.

However, even at a debug level of 100, I was not getting the exact reason behind mysql connection failure. The code in mysql.c should print the mysql_error(), mysql_errno() and mysql_sqlstate() values at a much lower level once the connection couldn't be established. I think, this should be filed as a bug.

The problem stands resolved as of now.

Thanks and regards
Chandranshu



On Wed, Apr 15, 2009 at 2:41 PM, Craig Ringer <craig AT postnewspapers.com DOT au> wrote:
Chandranshu . wrote:
> Hi Craig,
>
> How do I run the director in an interactive terminal? Please bear with me as
> I'm still new with bacula.

/etc/init.d/bacula-dir stop
sudo -u bacula bacula-dir -d100

... should do it. I don't have a director to test with. I think there's
help on the website re debugging director/sd issues, too.

Hopefully that'll get you a MySQL error code or something more useful
than the generic error provided.

--
Craig Ringer

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users