Created
June 4, 2018 01:39
-
-
Save ncole458/481c320ec9a0deccbd6a99fdb5eb07a0 to your computer and use it in GitHub Desktop.
Grant remote access to MySQL database
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
# UPDATE AWS EC2 SECURITY GROUPS FIRST TO ALLOW MySQL CONNECTION VIA IP | |
--- | |
# Edit /etc/mysql/my.cnf, and change the binding address to 0.0.0.0 | |
bind-address = 0.0.0.0 | |
# then restart mysql server | |
$ sudo /etc/init.d/mysql restart | |
# Create a new user for any host in MySQL | |
CREATE USER 'your_user'@'%' IDENTIFIED BY 'your-unique-password'; | |
# grant privileges to table(s) | |
GRANT ALL PRIVILEGES ON database_name.* TO 'your_user'@'%' WITH GRANT OPTION; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment