January 14, 2011
mysql config bind local replace script
AS IS! No guarantee.
-- bind-local-replace.sh
--
Usage:
and then manually check and then copy:
-- 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: administering, automatization, mysqld, script, security