Created
May 23, 2012 16:55
-
-
Save dstroot/2776351 to your computer and use it in GitHub Desktop.
Install mysql on amazon EC2 AMI
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 | |
############################################### | |
# To use: | |
# https://raw.github.com/gist/2776351/5fc6f3a63450ff6986ac916fce54d70c16937646/ec2-mysql-installation.sh | |
# chmod 777 install-redis.sh# ./install-redis.sh | |
############################################### | |
echo "*****************************************" | |
echo " Installing MySQL" | |
echo "*****************************************" | |
echo " " | |
sudo yum -y install mysql mysql-server | |
sudo /sbin/chkconfig --levels 235 mysqld on | |
sudo /sbin/service mysqld start | |
#sudo /etc/init.d/mysqld start | |
echo "*****************************************" | |
echo " Answer the wizard questions as follows:" | |
echo " 1: Enter current password for root: Press return for none" | |
echo " 2: Change Root Password: Y" | |
echo " 3: New Password: Enter *your* new password" | |
echo " 4: Remove anonymous user: Y" | |
echo " 5: Disallow root login remotely: Y" | |
echo " 6: Remove test database and access to it: Y" | |
echo " 7: Reload privilege tables now: Y" | |
echo "*****************************************" | |
read -p "Press [Enter] to continue..." | |
mysql_secure_installation | |
echo "Complete!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment