diff options
author | 2015-12-12 04:04:59 +0000 | |
---|---|---|
committer | 2015-12-12 04:53:22 +0000 | |
commit | 26e1b1c7acbbadf08152e94ff9910ccd6b200ec5 (patch) | |
tree | e6a3a4a5de8a4071563c38774ef7b3ef552d562f /rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_configure.sh | |
parent | 9ffc70b519ff244ca0501f11de00234f4d423c14 (diff) |
Update MySQL configure
Scripts update to support mysql install in a clean ubuntu 14.04 OS
JIRA:BOTTLENECK-24
Change-Id: I425bcaeb3b07b9cf073d1e4b3d0280a908e5f6db
Signed-off-by: QiLiang <liangqi1@huawei.com>
Diffstat (limited to 'rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_configure.sh')
-rwxr-xr-x | rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_configure.sh | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_configure.sh b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_configure.sh index 5b5362ab..01a718d9 100755 --- a/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_configure.sh +++ b/rubbos/rubbos_scripts/1-1-1/scripts/MYSQL1_configure.sh @@ -6,8 +6,10 @@ source set_bottlenecks_rubbos_env.sh echo "CONFIGURING MYSQL on $HOSTNAME" cd $MYSQL_HOME +chown -R mysql:mysql ./ cp support-files/my-medium.cnf /etc/my.cnf -bin/mysqld_safe --user=$BOTTLENECKS_USER & +#bin/mysqld_safe --user=$BOTTLENECKS_USER & +bin/mysqld_safe& sleep 10 #bin/mysqladmin -u root password 'new-password' cp support-files/mysql.server /etc/init.d/mysql.server @@ -19,4 +21,22 @@ fi ln -s $MYSQL_HOME/bin/mysql /usr/local/bin/mysql +sleep 20 + +cat << EOF | mysql -uroot + +CREATE DATABASE rubbos; + +GRANT ALL PRIVILEGES ON rubbos.* TO 'rubbos'@'%' \ + IDENTIFIED BY 'rubbos'; + flush privileges; +GRANT ALL PRIVILEGES ON rubbos.* TO 'rubbos'@'localhost' \ + IDENTIFIED BY 'rubbos'; + flush privileges; +EOF + +tar xzf /tmp/$RUBBOS_DATA_TARBALL +mysql -uroot rubbos < $RUBBOS_DATA_SQL +rm $RUBBOS_DATA_SQL + echo "DONE CONFIGURING MYSQL on $HOSTNAME" |