Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2005
    Posts
    150

    set max connection limit for specific mysql database

    Have a customer on a shared hosting server who is constantly using 70-80% of the max mysql connections (currently set at 100). I was wondering if there was a way that I could limit the max mysql connections for this one particular customer?

  2. #2
    Join Date
    May 2004
    Location
    Lansing, MI, USA
    Posts
    1,548

    Re: set max connection limit for specific mysql database

    Originally posted by jaymef
    Have a customer on a shared hosting server who is constantly using 70-80% of the max mysql connections (currently set at 100). I was wondering if there was a way that I could limit the max mysql connections for this one particular customer?
    I believe this can be done on a per-user basis but not per-database.

    http://mysql.digipedia.pl/mysql/en/user-resources.html
    Jacob - WebOnce Technologies - 30 Day 100% Satisfaction Guarantee - Over 5 Years Going Strong!
    Website Hosting, PHP4&5, RoR, MySQL 5.0, Reseller Hosting, Development, and Designs
    Powered By JAM - Professional Website Development - PHP, MySQL, JavaScript, AJAX - Projects Small & Large

  3. #3
    Join Date
    Mar 2006
    Posts
    302
    How to set it using cpanel?

  4. #4
    Regards,
    Rose [[email protected]]
    InstaCarma.com
    24x7 Technical Support and Server Management

  5. #5
    Join Date
    Mar 2006
    Posts
    302
    You mean, just create .my.cnf file each home directory. For example, /home/myuser/my.cnf

  6. #6
    Join Date
    Mar 2006
    Posts
    302
    What should I put in the my.cnf? is it ok as below. Do I need to restart service when I have created this file?

    [Mysqld]
    set-variable=max_connections=250

  7. #7
    The parameter provided looks fine, but the file is ".my.cnf" and not "my.cnf". The one inside /etc is my.cnf whereas the one that you need to put in the home directory of a user is ".my.cnf" ( with the 'dot' prefix).

    set-variable=max_connections=200

    I have not really tried this out, so cannot guarantee how well it works but still worth a try

    Regards,
    Rose
    [email protected]
    Regards,
    Rose [[email protected]]
    InstaCarma.com
    24x7 Technical Support and Server Management

  8. #8
    Join Date
    Mar 2006
    Posts
    302
    ok, so the file is with the dot like .htaccess. Thanks... Do I have to restart mysqld?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •