User and and instead of defaults
parent
6cdbcfc9e6
commit
3dd010b40a
|
@ -32,9 +32,9 @@ if [ "$1" = "configure" ]; then
|
|||
if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then
|
||||
cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf
|
||||
# This creates the user.
|
||||
echo 'grant lock tables, alter,select,insert,update,delete,create,index on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
echo 'grant lock tables,alter,select,insert,update,delete,create,index on $ZM_DB_NAME.* to '$ZM_DB_USER'@localhost identified by "$ZM_DB_PASS";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
else
|
||||
echo 'grant lock tables, alter,select,insert,update,deletecreate, index on zm.* to 'zmuser'@localhost;' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
echo 'grant lock tables,alter,select,insert,update,delete,create,index on $ZM_DB_NAME.* to '$ZM_DB_USER'@localhost;' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
fi
|
||||
|
||||
# Ensure zoneminder is stopped
|
||||
|
|
Loading…
Reference in New Issue