Unbind the MySQL database native binding restriction method under Ubuntu

  • 2020-05-27 07:23:24
  • OfStack

Problem: on the Ubuntu system, the MySQL account was added, giving the database full access and allowing the database to be linked from the outside
However, the MySQL database cannot be accessed remotely.

Reason: on the Ubuntu system, the default installation of MySQL limits native access to the database

Solution: remove the native binding restriction on the MySQL database

nano etc/mysql/my cnf # edit the configuration file
Find bind-address = 127.0.0.1

Instead of

#bind-address = 127.0.0.1
ctrl+o # save the configuration
ctrl + x # exit
/ etc/init d/mysql restart # restart the database

You are now ready to connect to the MySQL database remotely


Related articles: