Created
September 6, 2022 12:49
-
-
Save zgramming/777b26e12ec4a3ed463bc8ab7e689f77 to your computer and use it in GitHub Desktop.
Enable MYSQL Remote Connection
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
MYSQL ENABLE REMOTE CONNECTION | |
SELECT user, host, plugin from mysql.user; | |
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf | |
bind-address = 0.0.0.0 (ubah dari 127.0.0.0 ke 0.0.0.0) | |
CREATE USER 'zeffry'@'%' IDENTIFIED WITH mysql_native_password BY 'YOUR-STRONG-PASSWORD'; | |
GRANT ALL PRIVILEGES ON *.* TO 'zeffry'@'%' WITH GRANT OPTION; | |
FLUSH PRIVILEGES; | |
exit; | |
sudo ufw allow from 103.191.92.211 to any port 3306 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment