Skip to content

Instantly share code, notes, and snippets.

@willnet
Created January 29, 2012 12:54
Show Gist options
  • Save willnet/1698698 to your computer and use it in GitHub Desktop.
Save willnet/1698698 to your computer and use it in GitHub Desktop.
install and setting manual for mysql on ec2-micro
sudo yum install mysql mysql-server mysql-devel
sudo cp /etc/my.cnf /etc/my.cnf.orig
wget https://raw.github.com/willnet/config/master/my.cnf.ec2-micro
sudo mv my.cnf.ec2-micro /etc/my.cnf
sudo mysql_install_db
sudo mysqld_safe --defaults-file=/etc/my.cnf --user=mysql &
mysql -u root
TRUNCATE TABLE mysql.user;
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'xxxxxxxx' WITH GRANT OPTION;
CREATE DATABASE yourapp_production;
GRANT ALL PRIVILEGES ON yourapp_production.* TO yourapp IDENTIFIED BY 'xxxxxxxx'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment