Title: RE: [Bacula-users] RE: Database creation

Rowdy,

Thanks for the help - seems to learn a lot as we move along

I have done what you suggested and I can see the tables been created for the bacula database however I still am experiencing this:

21-Jun 22:17 bacula-dir:  Warning: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
21-Jun 22:17 bacula-dir:  Warning: WARNING!!!! The Internal Database is NOT OPERATIONAL!
21-Jun 22:17 bacula-dir:  Warning: You should use SQLite, PostgreSQL, or MySQL

Also I can't find the bacula-dir and bacula-sd in the /etc/init.d/ so I can't run a service bacula-dir start and a bacula-sd start

I have configured my bacula-dir, bacula-sd, bacula-fd and bconsole.conf however it seems that the database is not operational - I thought when you include the --with-mysql when running the ./configure that should do it however it seems not the case here

Appreciate any further pointers

Cheers


-----Original Message-----
From: Rowdy [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 18, 2005 10:21 PM
To: Sakaio Manoa
Cc: 'bacula-users@lists.sourceforge.net'
Subject: Re: [Bacula-users] RE: Database creation

Sakaio Manoa wrote:
> I tried running the make_mysql_tables however I got this
>
> ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)
> Creation of Bacula MySQL tables failed.
>
> I have created the database bacula using phpMyAdmin and I can see the
> bacula database but creating the tables.
>
> I think the problem here is running the script as I don't have the
> permissions. I can log into mysql but it just won't let me run the
> scripts to create the tables.
>
> As requested:
>
> Here is my make_mysql_table script
> #!/bin/sh
> #
> # shell script to create Bacula MySQL tables
> #
> bindir=/usr/bin
>
> if $bindir/mysql $* -f <<END-OF-DATA
> USE bacula;
> CREATE TABLE Filename (
>   FilenameId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
>   Name BLOB NOT NULL,
>   PRIMARY KEY(FilenameId),
>   INDEX (Name(255))
>   );
>
> CREATE TABLE Path (
>    PathId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
>    Path BLOB NOT NULL,
>    PRIMARY KEY(PathId),
>    INDEX (Path(255))
>    );
>
>
> Cheers
>
> Sakaio P Manoa

THis is a step forward.  Now it comes down to a MySQL user/permission
problem.

I believe that Bacula will generally be accessing it's database as the
user 'bacula', so you will need to grant sufficient permissions to that
user to the database.  Something like this (you will need to login to
MySQL as the user you used to create the database):

grant all on bacula.* to [EMAIL PROTECTED] identified by 'password';

Replace 'password' with the password you wish to use - it should be a
quoted string.  Also this assumes that MySQL and Bacula are running on
the same server - if not then replace [EMAIL PROTECTED] with
[EMAIL PROTECTED] (where servername is the name or IP address of the
machine running Bacula).

Then you can run the make_mysql_tables script and pass it the
appropriate parameters:

./make_mysql_tables -u bacula -p

This will prompt you for the password (safest).

Or, if you are absolutely sure no-one else will be watching the
processes on your system, you can pass the password on the command line:

./make_mysql_tables -u bacula -ppassword

Note that there is no space between -p and password - this is a MySQL
convention.

Nearly there :)

Rowdy

Reply via email to