I have hit a problem, when I edit the my.cnf
for MySQL, the bind-address
line is not in the file.
Here is the content of /etc/mysql/my.cnf
:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Kindly help me to achieve this.
Just add these lines to mysqld
section depending on your preferences:
If you want it to only be accessible through localhost:
bind-address=127.0.0.1
If you want it to be accessible through an interface which assigned an IP address of XXX.YYYY.WWW.ZZZZ:
bind-address=XXX.YYYY.WWW.ZZZZ
If you want it to be accessible through all interfaces available, This is not recommended except when you properly configured your firewall for it:
bind-address=0.0.0.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With