I've got a pretty basic question,
I am making a configuration script for mySQL replication between 2 new blank servers, now to make it a bit more failsafe I added the lines:
sed '/log-bin/d' /etc/my.cnf sed '/server/d' /etc/my.cnf
So that, if there where already config options set by default, it would remove the lines in question.
Now, in the next step of the script I want it to readd those lines, with the options we desire. The only problem I'm having is that the my.cnf file is made up with
like headers, what I'm wondering is (and can't find by means of google) is if these actually matter, of if they are mainly to indicate things.
can I just add
echo "log-bin=mysql-bin" >> /etc/my.cnf echo "server-id=1" >> /etc/my.cnf
or do they need to be in the section marked with
and if they are, can I "expand" the section by adding another
at the bottom of the file so that you would have 2x this "region" ?
effectivly making it look like this:
#start file [mysqld] #options here [mysql.server] #options [mysqld_safe] #options [mysqld] log-bin=mysql-bin server-id=1