summaryrefslogtreecommitdiffstats
path: root/lcm/resources/dbscripts
diff options
context:
space:
mode:
Diffstat (limited to 'lcm/resources/dbscripts')
-rw-r--r--lcm/resources/dbscripts/mysql/onap-gvnfm-vnfres-createdb.sql9
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;