diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2019-04-03 09:18:28 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2019-04-03 09:18:28 +0800 |
commit | d832753cefc69cb5813316c789319b1aaff2aba8 (patch) | |
tree | 0582965fbfbea0cb7fe10c8e9c73fa9202092c4d /lcm/resources/dbscripts | |
parent | e7891e6a0d35b2d427305fdfdc63aba6ea79a0cb (diff) |
Fix docker init db file
Change-Id: I8b4a04768d4816775606861cd2d598acc8939100
Issue-ID: VFC-1306
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'lcm/resources/dbscripts')
-rw-r--r-- | lcm/resources/dbscripts/mysql/onap-gvnfm-vnfres-createdb.sql | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lcm/resources/dbscripts/mysql/onap-gvnfm-vnfres-createdb.sql b/lcm/resources/dbscripts/mysql/onap-gvnfm-vnfres-createdb.sql index 79133432..aebcd6b7 100644 --- a/lcm/resources/dbscripts/mysql/onap-gvnfm-vnfres-createdb.sql +++ b/lcm/resources/dbscripts/mysql/onap-gvnfm-vnfres-createdb.sql @@ -12,18 +12,15 @@ -- See the License for the specific language governing permissions and -- limitations under the License. -/******************drop old database and user***************************/ +/******************create database and user***************************/ use mysql; -drop database IF EXISTS gvnfm; -delete from user where User='gvnfm'; -FLUSH PRIVILEGES; -/******************create new database and user***************************/ -create database gvnfm CHARACTER SET utf8; +create database if not exists gvnfm CHARACTER SET utf8; GRANT ALL PRIVILEGES ON gvnfm.* TO 'gvnfm'@'%' IDENTIFIED BY 'gvnfm' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON mysql.* TO 'gvnfm'@'%' IDENTIFIED BY 'gvnfm' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON gvnfm.* TO 'gvnfm'@'localhost' IDENTIFIED BY 'gvnfm' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON mysql.* TO 'gvnfm'@'localhost' IDENTIFIED BY 'gvnfm' WITH GRANT OPTION; + FLUSH PRIVILEGES; |