Mysql "max user_connections"!!

Discussion in 'Installation/Configuration' started by makensy13, Jan 26, 2011.

  1. makensy13

    makensy13 New Member


    It is not possible to restrict the number of user connections "MAX USER_CONNECTIONS.

    By default, it seems to me it is unlimited.

    I had to go into phpMyAdmin to limit the number of max user connection.

    Is it possible to do this in the console or ISPConfig Is there any plans to add this feature.

    Thank you.

  2. CSsab

    CSsab New Member

    You could alter these settings I guess in php.ini

    This is how mine looks:

    lines 1196 onwards of php.ini


    ; Maximum number of persistent links. -1 means no limit.
    mysqli.max_persistent = -1

    ; Allow accessing, from PHP's perspective, local files with LOAD DATA statements
    ;mysqli.allow_local_infile = On

    ; Allow or prevent persistent links.
    mysqli.allow_persistent = On

    ; Maximum number of links. -1 means no limit.
    mysqli.max_links = -1

    ; If mysqlnd is used: Number of cache slots for the internal result set cache
    mysqli.cache_size = 2000

    ; Default port number for mysqli_connect(). If unset, mysqli_connect() will use
    ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
    ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
    ; at MYSQL_PORT.
    mysqli.default_port = 3306

    ; Default socket name for local MySQL connects. If empty, uses the built-in
    ; MySQL defaults.
    mysqli.default_socket =

    ; Default host for mysql_connect() (doesn't apply in safe mode).
    mysqli.default_host =

    ; Default user for mysql_connect() (doesn't apply in safe mode).
    mysqli.default_user =

    ; Default password for mysqli_connect() (doesn't apply in safe mode).
    ; Note that this is generally a *bad* idea to store passwords in this file.
    ; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
    ; and reveal this password! And of course, any users with read access to this
    ; file will be able to reveal the password as well.
    mysqli.default_pw =

    ; Allow or prevent reconnect
    mysqli.reconnect = Off

    in /etc/php5/cli/php.ini
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Max user connections are limited by default to 100 or 150. Thats compiled into mysql. It is important that you do not set a small limit for that value or your system will fail. You should set

    max_connections = 500


    max_user_connections = 500

    in the mysql my.cnf configuration file.
  4. CSsab

    CSsab New Member

    I misunderstood the question here sorry :p

Share This Page