Created
May 23, 2017 15:22
-
-
Save futeng/e8e44701f86dc4043634398362bb5c3b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Name : mgr-start.sh | |
if [ -z $1 ]; then | |
echo "port should not be empty!" | |
exit 1 | |
fi | |
# Init MySQL | |
/usr/local/mysql/bin/mysqld --defaults-file=/data/mysql/mysql_$1/my$1.cnf --initialize-insecure | |
# Start MySQL | |
/usr/local/mysql/bin/mysqld --defaults-file=/data/mysql/mysql_$1/my$1.cnf & | |
# Execute Create Group Replication SQL | |
/usr/local/mysql/bin/mysql --defaults-file=/data/mysql/mysql_$1/my$1.cnf < ./create_rpl_user.sql | |
pidof mysqld | |
/usr/local/mysql/bin/mysql --defaults-file=/data/mysql/mysql_$1/my$1.cnf -e " select host, user from mysql.user" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment