On 3/1/11 11:56 AM, Maria Mckinley wrote:
> Re: [Bacula-users] upgrading bacula problem with mysql
> From: Phil Stracchino <alaric@me...> - 2011-03-01 00:58
> On 02/28/11 17:39, Maria Mckinley wrote:
>  > Hi there,
>  >
>  > I am upgrading bacula, but am having problems with my database. When I
>  > upgraded from Debian Lenny to Debian Squeeze, I ran into the version
>  > error bug, and I used 'update_mysql_tables_10_to_11' from Jim Padel
>  > posted in the bug report here:
>  >
>  > https://bugs.launchpad.net/ubuntu/+source/bacula/+bug/579924
>  >
>  > to upgrade to 11, and then update_mysql_tables with the advice from
>  > Johan Vervloet on the same page for updating to 12.
>  >
>  > When I try to start bconsole, bacula-dir dies, and I get this in the
> logs:
>  >
>  > 28-Feb 13:57 bacula-dir JobId 0: Fatal error: Could not open Catalog
>  > "MyCatalog", database "bacula".
>  > 28-Feb 13:57 bacula-dir JobId 0: Fatal error: mysql.c:194 Unable to
>  > connect to MySQL server.
>  > Database=bacula User=bacula
>  > MySQL connect failed either server not running or your authorization is
>  > incorrect.
>  > 28-Feb 13:57 bacula-dir ERROR TERMINATION
>  > Please correct configuration file: /etc/bacula/bacula-dir.conf
>  >
>  > If I log into mysql, I find that the username/password are just fine,
>  > but my database is not as I expect:
>  >
>  > mysql> show grants for 'bacula';
>  > +----------------------------------------------------+
>  > | Grants for bacula@% |
>  > +----------------------------------------------------+
>  > | GRANT USAGE ON *.* TO 'bacula'@'%' |
>  > | GRANT ALL PRIVILEGES ON `bacula`.* TO 'bacula'@'%' |
>  > +----------------------------------------------------+
>  > 2 rows in set (0.00 sec)
>  > mysql> select * from MyCatalog;
>  > ERROR 1146 (42S02): Table 'bacula.MyCatalog' doesn't exist
>  > mysql> SHOW TABLES;
>  > +------------------+
>  > | Tables_in_bacula |
>  > +------------------+
>  > | BaseFiles |
>  > | CDImages |
>  > | Client |
>  > | Counters |
>  > | Device |
>  > | File |
>  > | FileSet |
>  > | Filename |
>  > | Job |
>  > | JobHisto |
>  > | JobMedia |
>  > | Location |
>  > | LocationLog |
>  > | Log |
>  > | Media |
>  > | MediaType |
>  > | Path |
>  > | PathHierarchy |
>  > | PathVisibility |
>  > | Pool |
>  > | Status |
>  > | Storage |
>  > | UnsavedFiles |
>  > | Version |
>  > +------------------+
>  > 24 rows in set (0.00 sec)
>  >
>  > So, what happened to MyCatalog in the upgrade?
>
>
> Nothing. There is no MyCatalog table. 'MyCatalog', or whatever you
> replace it with, is a name for Bacula to use to identify that specific
> catalog database.
>
> Your DB is present. MySQL is running. You can connect to it, yet
> Bacula can't. Did Debian helpfully change your Bacula passwords in your
> config files for you, or perhaps replace your Bacula config files
> altogether...?
>
> Hi Phil,
>
> Thanks for your help. Debian did replace my config files, and I put them
> back. The password/username is the same in my config as the ones I
> entered into MySQL. I think it is connecting, but looking for a table
> that doesn't exist? Is it possible it would give me the connection error
> if it connected but didn't find the database it was looking for?
> Unfortunately my MySQL skills are pretty low, but it seems that somehow
> the bacula database name changed? What name do I put in to the config
> file to see if it can connect if it has a table to connect to? Iow, is
> one of those tables above something that bacula could connect to and
> understand? It almost seems to be that what was once called
> bacula.MyCatalog is now just called bacula?
>
> thanks,
> maria

Hi there,

Okay, I was confused about the Catalog directive. MyCatalog is just the 
name used internally by bacula to know which Catalog directive to use 
for backup. The name of the database is bacula, which has not changed. 
For some reason, the director no longer crashes when I try to log in to 
bconsole. But, bacula can still not log in to mySQL, even though I can 
log in at the command line with the exact same name and password. What 
else does bacula need besides the correct username/password to log into 
the MySQL database?

28-Feb 01:05 billie-dir JobId 0: Fatal error: Could not open database 
"bacula".
28-Feb 01:05 billie-dir JobId 0: Fatal error: mysql.c:194 Unable to 
connect to MySQL server.
Database=bacula User=bacula
MySQL connect failed either server not running or your authorization is 
incorrect.
28-Feb 01:05 billie-dir: Fatal Error at mysql.c:350 because:
rwl_writelock failure. stat=22: ERR=Invalid argument
28-Feb 01:05 billie-dir: Fatal Error because: Bacula interrupted by 
signal 11: Segmentation violation
28-Feb 11:44 billie-dir: ERROR in authenticate.c:418 Unable to 
authenticate console "*UserAgent*" at client:127.0.0.1:36131.
28-Feb 13:25 billie-dir: ERROR in authenticate.c:418 Unable to 
authenticate console "*UserAgent*" at client:127.0.0.1:36131.

What is this UserAgent thing. and where does it come from?

thanks,
maria

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to