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: , , , ,

Comments: Post a Comment



<< Home

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