Created
May 23, 2017 14:24
-
-
Save futeng/bd45c448564a57df14b5cceac88986eb 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-init.sh | |
# author: ifuteng@gmail.com | |
# date: 2017/05/23 | |
if [ -z "$1"]; then | |
echo "port should not be empty!" | |
exit 1 | |
fi | |
mkdir /opt/apps | |
mv ./mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz /opt/apps | |
tar zxvf /opt/apps/mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz -C /opt/apps | |
ln -s /opt/apps/mysql-5.7.18-linux-glibc2.5-x86_64 /usr/local/mysql | |
mkdir -p /data/mysql/mysql_$1/{data,logs,tmp} | |
chown -R mysql.mysql /data/mysql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment