Last active
August 29, 2015 14:01
-
-
Save chenwery/4653e5ebecfd790a417c to your computer and use it in GitHub Desktop.
mysql-simple-config
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
#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