]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/grant_mysql_privileges.in
Eliminate bsd_queue conflict with winnt.h
[bacula/bacula] / bacula / src / cats / grant_mysql_privileges.in
1 #!/bin/sh
2 #
3 # shell script to grant privileges to the bacula database
4 #
5 bindir=@SQL_BINDIR@
6
7 if $bindir/mysql $* -u root -f <<END-OF-DATA
8 use mysql
9 grant all privileges on bacula.* to bacula@localhost with grant option;
10 grant all privileges on bacula.* to bacula@"%" with grant option;
11 select * from user;
12 flush privileges;
13 END-OF-DATA
14 then
15    echo "Privileges for bacula granted."
16    exit 0
17 else
18    echo "Error creating privileges."
19    exit 1
20 fi