Skip to content

Instantly share code, notes, and snippets.

@aliemre
Last active April 8, 2021 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aliemre/6e0b4246a1a102f6ed3e602d0d1c03e1 to your computer and use it in GitHub Desktop.
Save aliemre/6e0b4246a1a102f6ed3e602d0d1c03e1 to your computer and use it in GitHub Desktop.
MySQL Remote Access
sudo nano /etc/my.cf
bind-address=0.0.0.0
Restart mysql service run on console:
sudo service mysqld restart
Create a user with a safe password for remote connection. To do this run following command in mysql
(if you are linux user to reach mysql console run mysql and if you set password for root run mysql -p):
mysql -u root -p
GRANT ALL PRIVILEGES ON *.* TO 'remote'@'%' IDENTIFIED BY 'safe_password' WITH GRANT OPTION;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment