Skip to content

Instantly share code, notes, and snippets.

@chenwery
Last active August 29, 2015 14:01
Show Gist options
  • Save chenwery/4653e5ebecfd790a417c to your computer and use it in GitHub Desktop.
Save chenwery/4653e5ebecfd790a417c to your computer and use it in GitHub Desktop.
mysql-simple-config
#install
yum install mysql-server
#auto start on rebooting
chkconfig mysqld on
#start
service mysqld start
(service mysqld stop)
(service mysqld restart)
#set users;create database;
mysqladmin -u root password ${your password}
mysqladmin -u root -p create ${database name}
#enter database;
mysql -u root -p
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, CREATE TEMPORARY TABLES ON mydb.* TO 'awsuser'@'<your public EC2 DNS address>' IDENTIFIED BY 'mypassword';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, CREATE TEMPORARY TABLES ON mydb.* TO 'awsuser'@'%' IDENTIFIED BY 'mypassword';
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment