It it possible to find out how many current connections are open to MySQL ?

if so, how ?

I use persistant connections , but am limited to 20, I'm not the admin so I can't change it.

just wondering to see if I can write a script to see how many current connections are open

    [man]mysql_stat/man might help.

    does anyone read the manual anymore?

      Guess not, I missed that one 🙂

      THANX.

        STOP USING PERSISTENT CONNECTIONS

        Persistent connections cannot be closed once open, are not pooled or recycled, and can only be closed by restarting mysql. So you very quickly run out of available connections.

        We debated this extensively once and the general consensus was that persistent connections are a menace and only required, or of any use indeed, in very rare and particular circumstances, and only when a nomal connection absolutely will not work.

        This is still not made clear in the manual, but it is there if you read it right.

          2 months later

          So in simple words, non persistent connection reduce the load of the server, but it may slow the exection down a little bit due to they need to open a new connection every time?

          Persistent connection may make the execution faster but for the small speedy advantage you get, you take the risks that you will exhaust the mysql server and totally get the mysql database stuck there and not working.

          Right?

            thorpe wrote:

            [man]mysql_stat/man might help.

            does anyone read the manual anymore?

            ...
            Uh...
            The manual's way too big.

              Write a Reply...