]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/grant_mysql_privileges.in
Fix NumVols in Pools, implement full listing of DB tables
[bacula/bacula] / bacula / src / cats / grant_mysql_privileges.in
1 #!/bin/sh
2 #
3 # shell script to create Bacula database(s)
4 #
5
6 bindir=@SQL_BINDIR@
7
8 if $bindir/mysql $* -u root -f <<END-OF-DATA
9 use mysql
10 grant all privileges on *.* to kern@localhost with grant option;
11 grant all privileges on *.* to kern@"%" with grant option;
12 grant all privileges on *.* to kelvin@localhost with grant option;
13 grant all privileges on *.* to kelvin@"%" with grant option;
14 grant all privileges on *.* to bacula@localhost with grant option;
15 grant all privileges on *.* to bacula@"%" with grant option;
16 select * from user;
17 flush privileges;
18 END-OF-DATA
19 then
20    echo "Privileges for kern, kelvin, and bacula granted."
21    exit 0
22 else
23    echo "Error creating privileges."
24    exit 1
25 fi