tags:

views:

671

answers:

2

Apache has such a feature, what about MySQL?

Does one exist?

A: 

Try:

sudo /etc/init.d/mysql reload

or

sudo /etc/init.d/mysql force-reload

That should initiate a reload of the configuration. Make sureyour init.d script supports it though, I don't know what version of MySQL/OS you are using?

My MySQL script contains the following:

'reload'|'force-reload')
        log_daemon_msg "Reloading MySQL database server" "mysqld"
        $MYADMIN reload
        log_end_msg 0
        ;;
Jon
Seems not working,I'm using mysql5.1,I added in [mysqld] section:transaction-isolation = READ-UNCOMMITTED,and after running your script,mysql> SELECT @@GLOBAL.tx_isolation, @@tx_isolation;+-----------------------+-----------------+| @@GLOBAL.tx_isolation | @@tx_isolation |+-----------------------+-----------------+| REPEATABLE-READ | REPEATABLE-READ | +-----------------------+-----------------+1 row in set (0.00 sec)mysql>
Shore
Oh,looks bad really..
Shore
mysql reload should reload all the grant tables and configuration. What was the outcome of running it?
Jon
none of above works,I've restarted mysql and then it works,thank you anyway!
Shore
I'm changing the configurations of 3 slave databases,after modifying my.cnf,I used your script,but seems not working,only after I restarted 1 of them,I see the output:mysql> SELECT @@GLOBAL.tx_isolation, @@tx_isolation;+-----------------------+------------------+| @@GLOBAL.tx_isolation | @@tx_isolation |+-----------------------+------------------+| READ-UNCOMMITTED | READ-UNCOMMITTED | +-----------------------+------------------+1 row in set (0.00 sec)say,it changed to READ-UNCOMMITTED,which is what I did in my.cnf
Shore
+1  A: 

Hey Shore,

You were so close! The kill -HUP method wasn't working for me either.

You were calling:

select @@global.max_connections;

All you needed was to set instead of select:

set @@global.max_connections = 400;

See:

http://www.netadmintools.com/art573.html

http://www.electrictoolbox.com/update-max-connections-mysql/

mixonic