Jump to content

MySQL Multiple Users Question


agrafuese

Recommended Posts

Hi there, I am currently working with a client with a high traffic website. i was concerned about the number of simultaneous mysql connections her host allowed, so i spoke to them, and they said that we could handle a max of 50 simultaneous connections at any one time, per mysql user, with a total max of 1500 simultaneous connections on the server (using multiple mysql users). my question is: how would i go about using multiple mysql users so that we could take advantage of the 1500 connection limit instead of just 50? is it like an overflow system, where i can use a series of if/then statements to check for a mysql overflow and then switch over to the next available user? or am i supposed to be assigning different user accounts for different tasks (i.e. one for log ins, one for item look ups, etc...)? i have only ever used one mysql user in all my years of php/mysql programming, so this is all very new to me. if none of this is possible and i have the wrong idea, is the real solution then to go with a dedicated server or VPN instead? any help is much appreciated. thank you.

Link to comment
Share on other sites

ah ok, so would you say that if i'm maxing connections, there's little i can do as a programmer to work around the 50 simultaneous connection limit imposed by my host? does "mysql_free_result" or "mysql_close" help at all in cases like this? i know mysql_free_result is used more for memory issues, and i make sure to use mysql_close at the end of all my scripts as a fail-safe, but i've also read that it's basically unnecessary because connections close at script's end anyway. also, keep in mind, im not using persistent connections. i've been consistently told that persistent connections are bad in cases where one needs to mind connection limits. so is my only answer to just get a better hosting solution where more than 50 simultaneous connections are possible?

Link to comment
Share on other sites

Well, to be honest, the reason I ask is because I'm working for a client with a high demand website. I contacted her host to make sure that their MySQL database could handle burst traffic (she just has a basic shared hosting plan), and this is what they said:

 

Regarding MySQL, we allow max 50 simultaneous connections per mysql user on server and 1500 per server.

 

I understood the "50 simultaneous connections" part, but I didn't know what they meant by "1500 per server". That's why I ask if there's anything else I can personally do, or is that "1500 per server" part just host gibberish to keep us as customers? I suspect that this particular host is the kind that inflates numbers just to sound impressive, but when it comes down to it, those numbers are actually just the total numbers for ALL accounts on one particular shared server, and not necessarily available to us.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.