I have a single server with multiple websites that each utilize PHP and MySQL on the server. All PHP scripts on all websites are connecting to the same MySQL server (localhost) … just a standard server environment, I assume.
My question is this: On a purely mysql-connection level, does it make any difference how the connections are divided among websites and/or users? If one website gets 100 times more traffic and thus accesses MySQL 100 times more, is it better for this website to connect using its own username and password?
I wouldn’t think it’d make any difference unless MySQL allocates resources on a per-user basis, or per-domain-account basis somehow.
I ask because in order to simplify an application I’m creating that is common to all sites, I’m thinking of having all the individual website php scripts connect to mysql under a single username/pwd (created under my hub website). There would be multiple databases under this account, one for each website.
I hope that’s clear - it’s harder to explain than to answer I hope )