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

2010-11-01 Thread catkins
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:
r...@cw8#58;~# /opt/bacula/scripts/grant_mysql_privileges
#91;OK#93;
r...@cw8#58;~# /opt/bacula/scripts/create_mysql_database
Creation of bacula database succeeded.
r...@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:
r...@cw8#58;/opt/bacula/etc# cd
r...@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:
r...@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 catki...@yahoo.co.uk via Backup Central.
|Forward SPAM to ab...@backupcentral.com.
+--



--
Nokia and ATT 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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


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

2010-11-01 Thread catkins
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 was previously initialised with:
r...@cw8#58;~# /opt/bacula/scripts/grant_mysql_privileges
#91;OK#93;
r...@cw8#58;~# /opt/bacula/scripts/create_mysql_database
Creation of bacula database succeeded.
r...@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:
r...@cw8#58;/opt/bacula/etc# cd
r...@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 show grants;
++
| Grants for bac...@localhostnbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 
nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; |
++
| GRANT USAGE ON *.* TO 'bacula'@'localhost'nbsp; nbsp; nbsp; nbsp; nbsp; 
nbsp; nbsp; nbsp; nbsp;|
| GRANT ALL PRIVILEGES ON `bacula`.* TO 'bacula'@'localhost' |
++
2 rows in set #40;0.00 sec#41;

mysql quit
Bye
Running with debug enabled:
r...@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 catki...@yahoo.co.uk via Backup Central.
|Forward SPAM to ab...@backupcentral.com.
+--



--
Nokia and ATT 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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


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

2010-11-01 Thread John Drescher
On Mon, Nov 1, 2010 at 11:07 AM, catkins bacula-fo...@backupcentral.com wrote:
 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 was previously initialised with:
 r...@cw8#58;~# /opt/bacula/scripts/grant_mysql_privileges
 #91;OK#93;
 r...@cw8#58;~# /opt/bacula/scripts/create_mysql_database
 Creation of bacula database succeeded.
 r...@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:
 r...@cw8#58;/opt/bacula/etc# cd
 r...@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 show grants;
 ++
 | Grants for bac...@localhostnbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 
 nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; |
 ++
 | GRANT USAGE ON *.* TO 'bacula'@'localhost'nbsp; nbsp; nbsp; nbsp; 
 nbsp; nbsp; nbsp; nbsp; nbsp;|
 | GRANT ALL PRIVILEGES ON `bacula`.* TO 'bacula'@'localhost' |
 ++
 2 rows in set #40;0.00 sec#41;

 mysql quit
 Bye
 Running with debug enabled:
 r...@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?


Although this is very hard to read on the mailing list your problem
may be that mysql is not listening on the network interface.

John

--
Nokia and ATT 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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


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

2010-03-17 Thread mehma sarja
I am guessing the following is a permissions problem. Anyone know what the
perms are supposed to be for each directory?

bacula-dir: dird.c:950 Could not open Catalog MyCatalog, database
bacula.

Here is the install procedure I followed:

PRE-REQUISITES
sudo apt-get upgrade  sudo apt-get update
sudo apt-get install g++ libpq-dev make
===

COMPILE
a.  Untar and cd to installation directory
b.  Put this in a bacula_conf file and make it executable sudo chmod 744
bacula_conf
#!/bin/sh
CFLAGS=-g -Wall \
  ./configure \
--sbindir=/usr/local/sbin \
--sysconfdir=/usr/local/etc \
--mandir=/usr/local/sbin \
--enable-smartalloc \
--enable-bwx-console \
--enable-tray-monitor \
--with-pid-dir=/usr/local/bacula/working \
--with-subsys-dir=/usr/local/bacula/working \
--with-postgresql \
--with-working-dir=/usr/local/bacula/working \
--with-dump-email=usern...@gmail.com \
--with-job-email=usern...@gmail.com \
--with-smtp-host=smtp/gmail.com
exit 0

***NOTE: BAT is not enabled - it requires qt to be installed

c. Still in the installation directory: sudo ./bacula_conf  sudo make 
sudo make install clean
===

UTF-8 to SQL_ASCII
sudo pg_dropcluster --stop 8.4 main
sudo pg_createcluster --start -e SQL_ASCII 8.4 main
===

DATABASE
sudo chown postgres:postgres /usr/local/etc/*
sudo su - postgres
As user postgres: createuser bacula
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n

As user postgres: /usr/local/etc/create_bacula_database
As user postgres: /usr/local/etc/make_bacula_tables
As user postgres: /usr/local/etc/grant_bacula_privileges
$ psql bacula
  bacula=# alter user bacula with password 'bacula';
\q
exit
===

FIRE_IT_UP
a.  Add password: vi /usr/local/etc/bacula-dir.conf and add password
'bacula' to dbpassword variable
b.  From anywhere: sudo bacula start
c.  Check status: sudo bacula status -of dir, sd and pd processes
- if the config or install does not go well, one or more process will
die
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users