Hello Heitor,
I can see in your dir.conf that you are using an "admin" user to connect to your database.
Did you try the bacula user? This is the one created by the grant_x_privileges script.
I took a look at the grant_mysql_privileges script. And noticed that the password entry wasn't set. So I set the password to the one I use and ran the script again.
And I was able to connect and run a query against the database:
[root@ops:/etc/bacula] #mysql -ubacula -p -e "use bacula; select * from Version"
Enter password:
+-----------+
| VersionId |
+-----------+
| 14 |
+-----------+
Then I tried changing the DB login information in the director conf to match what was in the mysql grant script:
# Generic catalog service
Catalog {
Name = JokefireCatalog
# Uncomment the following line if you want the dbi driver
# dbdriver = "dbi:mysql"; dbaddress = localhost; dbport = 3306
dbname = "bacula"; dbuser = "bacula"; dbpassword = "secret"
}
Then tried to startup the director again:
[root@ops:/etc/bacula] #service bacula-dir start
Starting bacula-dir: [ OK ]
[root@ops:/etc/bacula] #service bacula-dir status
bacula-dir dead but subsys locked
But no luck, unfortunately. :(
Same errors are turning up in the logs:
[root@ops:/etc/bacula] #tail /var/log/bacula/bacula.log
27-Mar 11:00 bacula-dir JobId 0: Fatal error: Query failed: SELECT VersionId FROM Version: ERR=no such table: Version
27-Mar 11:00 bacula-dir JobId 0: Fatal error: Could not open Catalog "JokefireCatalog", database "bacula".
27-Mar 11:00 bacula-dir JobId 0: Fatal error: Query failed: SELECT VersionId FROM Version: ERR=no such table: Version
27-Mar 11:00 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf
Any other ideas?
Thanks,
Tim