Last active
April 8, 2021 09:32
-
-
Save aliemre/6e0b4246a1a102f6ed3e602d0d1c03e1 to your computer and use it in GitHub Desktop.
MySQL Remote Access
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
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