diff options
Diffstat (limited to 'nfvparser/toscaparser/tests/artifacts/mysql')
4 files changed, 24 insertions, 0 deletions
diff --git a/nfvparser/toscaparser/tests/artifacts/mysql/mysql_database_configure.sh b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_database_configure.sh new file mode 100644 index 0000000..092136a --- /dev/null +++ b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_database_configure.sh @@ -0,0 +1,8 @@ +#!/bin/sh +cat << EOF | mysql -u root --password=$db_root_password +CREATE DATABASE $db_name; +GRANT ALL PRIVILEGES ON $db_name.* TO "$db_user"@"localhost" +IDENTIFIED BY "$db_password"; +FLUSH PRIVILEGES; +EXIT +EOF
\ No newline at end of file diff --git a/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_configure.sh b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_configure.sh new file mode 100644 index 0000000..d4ef6b4 --- /dev/null +++ b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_configure.sh @@ -0,0 +1,5 @@ +#!/bin/sh +sed --regexp-extended "s/(port\s*=\s*)[0-9]*/\1$db_port/g" </etc/mysql/my.cnf >/tmp/my.cnf +mv -f /tmp/my.cnf /etc/mysql/my.cnf +/etc/init.d/mysql stop +/etc/init.d/mysql start
\ No newline at end of file diff --git a/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_install.sh b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_install.sh new file mode 100644 index 0000000..38628b9 --- /dev/null +++ b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_install.sh @@ -0,0 +1,9 @@ +#!/bin/bash +#This script installs mysql server + +apt-get update + +debconf-set-selections <<< "mysql-server mysql-server/root_password password $db_root_password" +debconf-set-selections <<< "mysql-server mysql-server/root_password_again password $db_root_password" + +apt-get -y install --fix-missing mysql-server
\ No newline at end of file diff --git a/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_start.sh b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_start.sh new file mode 100644 index 0000000..3378670 --- /dev/null +++ b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_start.sh @@ -0,0 +1,2 @@ +#!/bin/sh +/etc/init.d/mysql start
\ No newline at end of file |