=== modified file 'bin/xtstat_xt.cc' --- bin/xtstat_xt.cc 2008-12-15 08:05:59 +0000 +++ bin/xtstat_xt.cc 2008-12-18 18:55:38 +0000 @@ -75,9 +75,9 @@ { OPT_HELP, '?', "help", 0, "Prints help text", NULL, 0, false }, { OPT_HOST, 'h', "host", OPT_HAS_VALUE, - "Connect to host", "localhost", 0, false }, + "Connect to host", NULL, 0, false }, { OPT_USER, 'u', "user", OPT_HAS_VALUE, - "User for login if not current user", "root", 0, false }, + "User for login if not current user", NULL, 0, false }, { OPT_PASSWORD, 'p', "password", OPT_HAS_VALUE | OPT_OPTIONAL, "Password to use when connecting to server. If password is not given it's asked from the tty", NULL, 0, false }, { OPT_DATABASE, 'd', "database", OPT_HAS_VALUE, @@ -85,7 +85,7 @@ { OPT_PORT, 'P', "port", OPT_HAS_VALUE | OPT_INTEGER, "Port number to use for connection", NULL, 3306, false }, { OPT_SOCKET, 'S', "socket", OPT_HAS_VALUE, - "Socket file to use for connection", "/tmp/mysql.sock", 0, false }, + "Socket file to use for connection", NULL, 0, false }, { OPT_DELAY, 'D', "delay", OPT_HAS_VALUE | OPT_INTEGER, "Delay in seconds between polls of the database", NULL, 1, false }, { OPT_PROTOCOL, 0, "protocol", OPT_HAS_VALUE, @@ -586,6 +586,9 @@ if (mysql_options(conn, MYSQL_OPT_PROTOCOL, (char *) &type)) return false; + if (mysql_options(conn, MYSQL_READ_DEFAULT_GROUP, "xtstat")) + return false; + /* Connect to database */ if (!mysql_real_connect(conn, options[OPT_HOST].opt_value_str,