• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Changing vhost mysql settings

Status
Not open for further replies.

TeunieP

Basic Pleskian
Hi, I have changed the value query_cache_size = 64M in \etc\my.cnf (previous value was 32M)
After that I have restarted Plesk (service psa restart).
I notice Plesk admin panel runs much smoother.

However when I look in one of my vhost/clients phpmyadmin variables this still shows query_cache_size = 32M.

How can I change the mysql query cache size for my clients? (not serverwide)
 
You cannot have per-vhost settings for MySQL as far as I'm aware.

Restarting plesk doesn't usually restart MySQL unless you use "service psa stopall" (followed by "service psa start").
It would be better to simply restart MySQL with "service mysqld restart". This will cause any changes you make to my.cnf to come into effect.


To better optimize MySQL settings to match your environment, try using mysqltuner (available as an rpm from certain repos).
Don't go overboard with changes though - if you give MySQL all the memory it could potentially use, you can end up using more than is available. You basically need a balance. So just take a look at what it says to start with, and make small changes. This is actually quite a complex subject, and you can potentially do more harm than good if you aren't careful.

Note that you can use the MySQL command "SHOW VARIABLES;" (or "SHOW VARIABLES LIKE '%size%';") to see what mysqld is currently set to use.
 
Thanks for your reply.
I have tried restarting just mysqld and also psa stop all but to no avail. It still shows cache size 32M in Phpmyadmin variables.
query_cache_size 33554432

So there must be a second location where this value is set...
I have no clue where to find it...
 
After complete server reboot query_cache_size shows 64M also for clients.
Strange that this setting is not applied with mysqld or PSA restart...

So reboot is required.
Solved!
 
Status
Not open for further replies.
Back
Top