is changing my.cnf without restart safe?

is changing my.cnf without restart safe?

am 08.11.2010 11:06:34 von AHMET ARSLAN

Hello MySQL Community,

Last Friday I changed /etc/mysql/my.cnf file (at server) accidentally.
I set the variable innodb_data_file_path to ibdata1:100M

Then I realized that I changed the server copy. Then to get the original value I issued the query :
SHOW VARIABLES LIKE 'innodb_data_file_path'

I get the following:
innodb_data_file_path = ibdata1:4000M;ibdata2:4000M;ibdata3:4000M;ibdata4:4000M:auto extend

I wrote this value to my.cnf again.

MySQL isn't restarted in these whole process. Whole thing took 5-10 minutes.

Here is my questions:

if i change something in my.cnf, they are not activated until i restart mysql right?

is above scenario safe? Do you think i messed up something?

Thank you for your help.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: is changing my.cnf without restart safe?

am 08.11.2010 15:59:31 von Johan De Meersman

--001636c5a7a547558704948bdf6d
Content-Type: text/plain; charset=ISO-8859-1

No, this is in and of itself safe. I didn't realise you could change the
InnoDB datafiles on the fly, though - thanks for that hint :-)

MySQL will never write the config file itself, so you're not at risk of
conflict there. You are at risk of putting something in the configfile which
messes up your MySQL server at the next restart, however; but that's pretty
much the case for any other daemon, too.



On Mon, Nov 8, 2010 at 11:06 AM, AHMET ARSLAN wrote:

> Hello MySQL Community,
>
> Last Friday I changed /etc/mysql/my.cnf file (at server) accidentally.
> I set the variable innodb_data_file_path to ibdata1:100M
>
> Then I realized that I changed the server copy. Then to get the original
> value I issued the query :
> SHOW VARIABLES LIKE 'innodb_data_file_path'
>
> I get the following:
> innodb_data_file_path =
> ibdata1:4000M;ibdata2:4000M;ibdata3:4000M;ibdata4:4000M:auto extend
>
> I wrote this value to my.cnf again.
>
> MySQL isn't restarted in these whole process. Whole thing took 5-10
> minutes.
>
> Here is my questions:
>
> if i change something in my.cnf, they are not activated until i restart
> mysql right?
>
> is above scenario safe? Do you think i messed up something?
>
> Thank you for your help.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=vegivamp@tuxera.be
>
>


--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

--001636c5a7a547558704948bdf6d--