Skip to content

Instantly share code, notes, and snippets.

@zgramming
Created September 6, 2022 12:49
Show Gist options
  • Save zgramming/777b26e12ec4a3ed463bc8ab7e689f77 to your computer and use it in GitHub Desktop.
Save zgramming/777b26e12ec4a3ed463bc8ab7e689f77 to your computer and use it in GitHub Desktop.
Enable MYSQL Remote Connection
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