Last active
December 24, 2015 23:19
-
-
Save ryoppy/6879139 to your computer and use it in GitHub Desktop.
mysql-install
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 | |
set -ex | |
cd | |
mkdir mysql | |
cd mysql | |
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-client-5.6.14-1.el6.x86_64.rpm/from/http://cdn.mysql.com/ -O MySQL-client-5.6.14-1.el6.x86_64.rpm | |
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-server-5.6.14-1.el6.x86_64.rpm/from/http://cdn.mysql.com/ -O MySQL-server-5.6.14-1.el6.x86_64.rpm | |
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-devel-5.6.14-1.el6.x86_64.rpm/from/http://cdn.mysql.com/ -O MySQL-devel-5.6.14-1.el6.x86_64.rpm | |
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-shared-5.6.14-1.el6.x86_64.rpm/from/http://cdn.mysql.com/ -O MySQL-shared-5.6.14-1.el6.x86_64.rpm | |
rpm -ivh MySQL-* | |
test -e /etc/my.cnf && cp /etc/my.cnf /etc/my.cnf.bak | |
cat << CONF > /etc/my.cnf | |
[mysqld] | |
character-set-server = utf8 | |
innodb_file_per_table | |
[mysqld_safe] | |
character-set-server = utf8 | |
CONF | |
chkconfig mysql on | |
service mysql start | |
cat ~/.mysql_secret | |
/usr/bin/mysql_secure_installation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment