sqlmig: init crée aussi 02grants.sql
This commit is contained in:
parent
de5727e7e2
commit
af2b74f31f
12
sqlmig
12
sqlmig
|
@ -1034,6 +1034,16 @@ drop database if exists @@database@@;"
|
|||
create database @@database@@;"
|
||||
fi
|
||||
|
||||
if [ ! -f "$dbdir/02grants.sql" ]; then
|
||||
estep "02grants.sql"
|
||||
echo >"$dbdir/02grants.sql" "\
|
||||
-- -*- coding: utf-8 mode: sql -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
-- @sqlmig admin
|
||||
|
||||
create user '$dbname' identified by '$dbname';
|
||||
grant all privileges on $dbname.* to '$dbname';"
|
||||
fi
|
||||
|
||||
if [ ! -f "$dbdir/my.cnf" ]; then
|
||||
estep "my.cnf"
|
||||
echo >"$dbdir/my.cnf" "\
|
||||
|
@ -1078,7 +1088,7 @@ drop user $dbname cascade;"
|
|||
-- -*- coding: utf-8 mode: sql -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
-- @sqlmig create
|
||||
|
||||
create user $dbname identified by \"password\";
|
||||
create user $dbname identified by \"$dbname\";
|
||||
grant connect to $dbname;
|
||||
grant resource to $dbname;"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue