January 14, 2011

 

mysql config bind local replace script

AS IS! No guarantee.

-- bind-local-replace.sh
#!/bin/bash
sed -e '/^bind[-]address*/ s/^/#/' | sed '/[[]mysql[]]/a \
bind-address=127.0.0.1
'


--
Usage:
./bind-local-replace.sh < /etc/my.cnf > /tmp/my.cnf

and then manually check and then copy:
cp /tmp/my.cnf /etc/my.cnf

Labels: , , , ,

September 3, 2010

 

mysqld security: listen to localhost only

add to /etc/my.cnf lines (in section [mysqld]):

[mysqld]
bind-address=127.0.0.1

Labels: , ,

This page is powered by Blogger. Isn't yours?