mysql poll

According to /etc/subr it's this:

Code:
                poll)
                        _run_rc_precmd || return 1
                        if [ -n "$rc_pid" ]; then
                                wait_for_pids $rc_pid
                        fi
                        _run_rc_postcmd
                        ;;

What it appears to do (on its own) is track down the PID and 'wait for it indefinitely' without actually going anywhere. So perhaps it's supposed to be used in conjunction with other things, as indicated by this information:

Code:
#       ${rc_arg}_precmd n      If set, run just before performing the
#                               ${rc_arg}_cmd method in the default
#                               operation (i.e, after checking for required
#                               bits and process (non)existence).
#                               If this completes with a non-zero exit code,
#                               don't run ${rc_arg}_cmd.
#
#       ${rc_arg}_postcmd n     If set, run just after performing the
#                               ${rc_arg}_cmd method, if that method
#                               returned a zero exit code.

sh -x /usr/local/etc/rc.d/mysql-server poll and sh -xv /usr/local/etc/rc.d/mysql-server poll don't really shed much light either, so it is probably an 'intermediary' command that needs to be run in between other commands.
 
Many thanks for your reply! I have another question: I changed a setting (max_connection) in my.cnf, is it possible to reload MySQL configuration file without restarting it?
 
SirDice said:
You'll have to restart it.

Actually the max_connections variable is a global variable, and it can be configured directly through mysql, although note, to ensure when mysql restarts next time, this value is enforced, ensure you update it in the /etc/my.cnf file too.

Code:
mysql> SHOW VARIABLES LIKE 'max_connections';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 151   |
+-----------------+-------+
1 row in set (0.00 sec)

mysql> SET GLOBAL max_connections=200;
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW VARIABLES LIKE 'max_connections';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 200   |
+-----------------+-------+
1 row in set (0.00 sec)

mysql>
 
A lot of settings can indeed be changed 'on-the-fly' as they say. But keep in mind that not all of them can. Also note that if you really want to re-read the my.cnf file you'll have to restart mysql.
 
Back
Top