Bacula-users

Re: [Bacula-users] error connecting to database

2015-08-04 21:44:26
Subject: Re: [Bacula-users] error connecting to database
From: Ana Emília M. Arruda <emiliaarruda AT gmail DOT com>
To: Tim Dunphy <bluethundr AT gmail DOT com>
Date: Tue, 4 Aug 2015 22:42:37 -0300
Hello Tim,

Try this:

Catalog {
  Name = MyCatalog 
  dbname = "bacula";  dbuser = "admin_ssl"; dbpassword = "secret"; dbaddress = "db.example.com"; dbport = 3306
}

Best regards,
Ana

On Tue, Aug 4, 2015 at 10:21 PM, Tim Dunphy <bluethundr AT gmail DOT com> wrote:
Hey guys,

I have no trouble at all getting the bacula director running if I connect to a local datbase running on the bacula server itself.

However if I try connecting to a database living on another host is where I run into an isssue.

If I try to setup a database that's not running on localhost, this is what I get in the logs:

05-Aug 01:14 bacula-dir JobId 0: Fatal error: mysql.c:210 Unable to connect to MySQL server.
Database=bacula User=admin_ssl
MySQL connect failed either server not running or your authorization is incorrect.
05-Aug 01:14 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf

This is how I tried to specify this in the director config:

# Generic catalog service
Catalog {
  Name = MyCatalog
# Uncomment the following line if you want the dbi driver
  dbdriver = "dbi:mysql"; dbaddress = "db.example.com"; dbport = 3306
  dbname = "bacula";  dbuser = "admin_ssl"; dbpassword = "secret"
}

I also tried specifying it this way:

# Generic catalog service
Catalog {
  Name = MyCatalog
# Uncomment the following line if you want the dbi driver
  #dbdriver = "dbi:mysql"; dbaddress = "db.jokefire.com"; dbport = 3306
  dbname = "bacula";  dbuser = "admin_ssl"; dbpassword = "secret" ; dbaddress = "db.example.com"
}

With the exact same result in the logs.

I have verified that I can connect to the database I'm trying to specify in the config on the command line using the same credentials:

#mysql -uadmin_ssl -p -h db.example.com -e "show databases"
Enter password:
+--------------------+
| Database           |
+--------------------+
| bacula             |
| certs              |
| information_schema |
| mysql              |
| performance_schema |
+--------------------+

Can someone please let me know where I am going wrong in the config?

Thanks!
Tim

--
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


------------------------------------------------------------------------------

_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users


------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users