Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you refresh the MySQL configuration file without restarting?

Tags:

database

mysql

Apache has such a feature, what about MySQL?

Does one exist?

like image 206
omg Avatar asked May 27 '09 20:05

omg


People also ask

How do you refresh a MySQL database?

To access the Refresh from Database dialog box, right-click an object in MySQL Metadata Explorer and click Refresh from Database.

Where is the configuration file for MySQL?

On RH systems, MySQL configuration file is located under /etc/my. cnf by default.

How do I restart MySQL gracefully?

From another console window, restart MySQL the way you normally would, either with initscripts (e.g., your local variant of service mysql. server restart ) or with mysqladmin shutdown followed by a manual restart.


2 Answers

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/

like image 136
mixonic Avatar answered Sep 22 '22 01:09

mixonic


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         ;; 
like image 41
Jon Avatar answered Sep 23 '22 01:09

Jon