Skip to content

Instantly share code, notes, and snippets.

@sandheepg
Created July 19, 2017 09:39
Show Gist options
  • Select an option

  • Save sandheepg/cafdab7fa3a7b5c8e26dbb7cc4a88767 to your computer and use it in GitHub Desktop.

Select an option

Save sandheepg/cafdab7fa3a7b5c8e26dbb7cc4a88767 to your computer and use it in GitHub Desktop.
MySQL remote connection

To make sure MySQL server listens to remote requests (other than orginating from localhost), edit MySQL configuration file using sudo

/etc/mysql/my.cnf
OR
any other file mentioned in the config file w/ includedir directives

and update

bind-address = 127.0.0.1
TO
bind-address = 0.0.0.0

Save the changes and restart the server

sudo service mysql restart

Validates the changes by running the below command locally

mysql -h ip-address --port=3306 -u user-name -p database-name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment