4.6.10.1 MySQL Instance Manager Command Options

Important

MySQL Instance Manager has been deprecated and is removed in MySQL 5.5.

The MySQL Instance Manager supports a number of command options. For a brief listing, invoke mysqlmanager with the --help option. Options may be given on the command line or in the Instance Manager configuration file. On Windows, the standard configuration file is my.ini in the directory where Instance Manager is installed. On Unix, the standard file is /etc/my.cnf. To specify a different configuration file, start Instance Manager with the --defaults-file option.

mysqlmanager supports the following options. The options for managing entries in the password file are described further in Section 4.6.10.4, “Instance Manager User and Password Management”.

  • --help, -?

    Display a help message and exit.

  • --add-user

    Add a new user (specified with the --username option) to the password file. This option was added in MySQL 5.1.12.

  • --angel-pid-file=file_name

    The file in which the angel process records its process ID when mysqlmanager runs in daemon mode (that is, when the --run-as-service option is given). The default file name is mysqlmanager.angel.pid.

    If the --angel-pid-file option is not given, the default angel PID file has the same name as the PID file except that any PID file extension is replaced with an extension of .angel.pid. (For example, mysqlmanager.pid becomes mysqlmanager.angel.pid.)

    This option was added in MySQL 5.1.11.

  • --bind-address=IP

    The IP address to bind to.

  • --check-password-file

    Check the validity and consistency of the password file. This option was added in MySQL 5.1.12.

  • --clean-password-file

    Drop all users from the password file. This option was added in MySQL 5.1.12.

  • --debug=debug_options, -# debug_options

    Write a debugging log. A typical debug_options string is d:t:o,file_name. This option was added in MySQL 5.1.10.

  • --default-mysqld-path=file_name

    The path name of the MySQL Server binary. This path name is used for all server instance sections in the configuration file for which no mysqld-path option is present. The default value of this option is the compiled-in path name, which depends on how the MySQL distribution was configured. Example: --default-mysqld-path=/usr/sbin/mysqld

  • --defaults-file=file_name

    Read Instance Manager and MySQL Server settings from the given file. All configuration changes made by the Instance Manager will be written to this file. This must be the first option on the command line if it is used, and the file must exist.

    If this option is not given, Instance Manager uses its standard configuration file. On Windows, the standard file is my.ini in the directory where Instance Manager is installed. On Unix, the standard file is /etc/my.cnf.

  • --drop-user

    Drop a user (specified with the --username option) from the password file. This option was added in MySQL 5.1.12.

  • --edit-user

    Change an entry for an existing user (specified with the --username option) in the password file. This option was added in MySQL 5.1.12.

  • --install

    On Windows, install Instance Manager as a Windows service. The service name is MySQL Manager.

  • --list-users

    List the users in the password file. This option was added in MySQL 5.1.12.

  • --log=file_name

    The path to the Instance Manager log file. This option has no effect unless the --run-as-service option is also given. If the file name specified for the option is a relative name, the log file is created under the directory from which Instance Manager is started. To ensure that the file is created in a specific directory, specify it as a full path name.

    If --run-as-service is given without --log, the log file is mysqlmanager.log in the data directory.

    If --run-as-service is not given, log messages go to the standard output. To capture log output, you can redirect Instance Manager output to a file:

    mysqlmanager > im.log
    
  • --monitoring-interval=seconds

    The interval in seconds for monitoring server instances. The default value is 20 seconds. Instance Manager tries to connect to each monitored (guarded) instance using the nonexisting MySQL_Instance_Manager user account to check whether it is available/not hanging. If the result of the connection attempt indicates that the instance is unavailable, Instance Manager performs several attempts to restart the instance.

    Normally, the MySQL_Instance_Manager account does not exist, so the connection attempts by Instance Manager cause the monitored instance to produce messages in its general query log similar to the following:

    Access denied for user 'MySQL_Instance_M'@'localhost' »
        (using password: YES)
    

    The nonguarded option in the appropriate server instance section disables monitoring for a particular instance. If the instance dies after being started, Instance Manager will not restart it. Instance Manager tries to connect to a nonguarded instance only when you request the instance's status (for example, with the SHOW INSTANCES status.

    See Section 4.6.10.5, “MySQL Server Instance Status Monitoring”, for more information.

  • --mysqld-safe-compatible

    Run in a mysqld_safe-compatible manner. For details, see Section 4.6.10.3, “Starting the MySQL Server with MySQL Instance Manager”. This option was added in MySQL 5.1.12.

  • --password=password, -p password

    Specify the password for an entry to be added to or modified in the password file. Unlike the --password/-P option for most MySQL programs, the password value is required, not optional. See also Section 4.6.10.4, “Instance Manager User and Password Management”. This option was added in MySQL 5.1.12.

  • --password-file=file_name

    The name of the file where the Instance Manager looks for users and passwords. On Windows, the default is mysqlmanager.passwd in the directory where Instance Manager is installed. On Unix, the default file is /etc/mysqlmanager.passwd. See also Section 4.6.10.4, “Instance Manager User and Password Management”.

  • --pid-file=file_name

    The process ID file to use. On Windows, the default file is mysqlmanager.pid in the directory where Instance Manager is installed. On Unix, the default is mysqlmanager.pid in the data directory.

  • --port=port_num

    The port number to use when listening for TCP/IP connections from clients. The default port number (assigned by IANA) is 2273.

  • --print-defaults

    Print the current defaults and exit. This must be the first option on the command line if it is used.

  • --print-password-line

    Prepare an entry for the password file, print it to the standard output, and exit. You can redirect the output from Instance Manager to a file to save the entry in the file.

    Prior to MySQL 5.1.12, this option was named --passwd.

  • --remove

    On Windows, removes Instance Manager as a Windows service. This assumes that Instance Manager has been run with --install previously.

  • --run-as-service

    On Unix, daemonize and start an angel process. The angel process monitors Instance Manager and restarts it if it crashes. (The angel process itself is simple and unlikely to crash.)

  • --socket=path

    On Unix, the socket file to use for incoming connections. The default file is named /tmp/mysqlmanager.sock. This option has no meaning on Windows.

  • --standalone

    This option is used on Windows to run Instance Manager in standalone mode. You should specify it when you start Instance Manager from the command line.

  • --user=user_name

    On Unix, the user name of the system account to use for starting and running mysqlmanager. This option generates a warning and has no effect unless you start mysqlmanager as root (so that it can change its effective user ID), or as the named user. It is recommended that you configure mysqlmanager to run using the same account used to run the mysqld server. (User in this context refers to a system login account, not a MySQL user listed in the grant tables.)

  • --username=user_name, -u user_name

    Specify the user name for an entry to be added to or modified in the password file. This option was added in MySQL 5.1.12.

  • --version, -V

    Display version information and exit.

  • --wait-timeout=N

    The number of seconds to wait for activity on an incoming connection before closing it. The default is 28800 seconds (8 hours).

    This option was added in MySQL 5.1.7. Before that, the timeout is 30 seconds and cannot be changed.


User Comments
Sign Up Login You must be logged in to post a comment.