Bacula-users

[Bacula-users] Could not open Catalog "MyCatalog", database "bacula"

2010-11-01 11:04:50
Subject: [Bacula-users] Could not open Catalog "MyCatalog", database "bacula"
From: catkins <bacula-forum AT backupcentral DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Mon, 01 Nov 2010 11:02:06 -0400
Hello  :) 

On a new installation of 5.0.3 with .conf files copied from a working 5.0.1 
installation.  MySQL 5.1.46.  Slackware64 13.1. 

>>From the log
24-Oct 18&#58;45 bacula-dir JobId 0&#58; Fatal error&#58; Could not open 
Catalog "MyCatalog", database "bacula".
24-Oct 18&#58;45 bacula-dir JobId 0&#58; Fatal error&#58; mysql.c&#58;194 
Unable to connect to MySQL server.
Database=bacula User=bacula
MySQL connect failed either server not running or your authorization is 
incorrect.
24-Oct 18&#58;45 bacula-dir ERROR TERMINATION
Please correct configuration file&#58; /opt/bacula/etc/bacula-dir.conf

MySQL is running and previously initialised:
root@CW8&#58;~# /opt/bacula/scripts/grant_mysql_privileges
&#91;OK&#93;
root@CW8&#58;~# /opt/bacula/scripts/create_mysql_database
Creation of bacula database succeeded.
root@CW8&#58;~# /opt/bacula/scripts/make_mysql_tables
Creation of Bacula MySQL tables succeeded.

Excerpt from bacula-dir.conf:
Catalog &#123;
&nbsp; Name = MyCatalog
&nbsp; # Uncomment the following line if you want the dbi driver
&nbsp; # dbdriver = "dbi&#58;mysql"; dbaddress = 127.0.0.1; dbport =&nbsp; 
&nbsp; dbname = "bacula"; dbuser = "bacula"; dbpassword = ""
&#125;

Can log on to database using above username and password:
root@CW8&#58;/opt/bacula/etc# cd
root@CW8&#58;~# mysql --user=bacula --password= bacula
Welcome to the MySQL monitor.&nbsp; Commands end with ; or \g.
Your MySQL connection id is 13
Server version&#58; 5.1.46-log Source distribution

Copyright &#40;c&#41; 2000, 2010, Oracle and/or its affiliates. All rights 
reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

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

mysql> quit
Bye
Running with debug enabled:
root@CW8&#58;~# /opt/bacula/bin/bacula-dir -d 300 -f
&#91;snip&#93;
bacula-dir&#58; mysql.c&#58;100-0 db_open first time
bacula-dir&#58; mysql.c&#58;129-0 initdb ref=1 connected=0 db=0
bacula-dir&#58; mysql.c&#58;165-0 mysql_init done
bacula-dir&#58; mysql.c&#58;186-0 mysql_real_connect done
bacula-dir&#58; mysql.c&#58;188-0 db_user=bacula db_name=bacula db_password=
bacula-dir&#58; mysql.c&#58;214-0 opendb ref=1 connected=1 db=6e6980
bacula-dir&#58; sql_create.c&#58;342-0 In create mediatype
bacula-dir&#58; sql_create.c&#58;345-0 selectmediatype&#58; SELECT 
MediaTypeId,MediaType FROM MediaType WHERE MediaType='File'
bacula-dir&#58; mysql.c&#58;235-0 closedb ref=0 connected=1 db=6e6980
bacula-dir&#58; mysql.c&#58;239-0 close db=6e6980
&#91;snip&#93;

What to do?

Best

Charles

+----------------------------------------------------------------------
|This was sent by catkin05 AT yahoo.co DOT uk via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT com.
+----------------------------------------------------------------------



------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users