Koozali.org: home of the SME Server

Obsolete Releases => SME 9.x Contribs => Topic started by: jameswilson on July 21, 2020, 01:35:34 PM

Title: mysql57 custom template
Post by: jameswilson on July 21, 2020, 01:35:34 PM
Ive been looking at this on and off for a few days now.
I need to enable (i think) query cache
Ive managed to do it on the default 5.1 version but not 5.7

I want to add these settings
query_cache_type=1
query_cache_size = 10M
query_cache_limit=256K

ive tried adding setprop keys

config show mysql57-mysqld
mysql57-mysqld=service
    LocalNetworkingOnly=no
    port=3309
    query_cache_limit=256K
    query_cache_size=10M
    query_cache_type=1
    status=enabled

but they dont appear to work.
Where do I put or what do i name a custom fragment for mysql57
Title: Re: mysql57 custom template
Post by: jameswilson on July 21, 2020, 01:40:12 PM
Meant to add thanks! oops
Title: Re: mysql57 custom template
Post by: ReetP on July 21, 2020, 01:57:41 PM
Unless it says explicitly that these are configuration items you can't just add something as a key and hope it will work. They keys are read by templates or other actions. Unless there is a specific call to a specific key they are ignored.

Yes, you are most likely going to need a custom template.

Have a look through the existing templates probably somewhere here:

/etc/e-smith/templates/opt/rh/mysql57/root/etc/my.cnf

Title: Re: mysql57 custom template
Post by: jameswilson on July 21, 2020, 02:21:51 PM
Unless it says explicitly that these are configuration items you can't just add something as a key and hope it will work. They keys are read by templates or other actions. Unless there is a specific call to a specific key they are ignored.

Yes, you are most likely going to need a custom template.

Have a look through the existing templates probably somewhere here:

/etc/e-smith/templates/opt/rh/mysql57/root/etc/my.cnf

Ah yes it will be ignoring them then. Should i remove them?

Yes the template is exactly where you said. Can I edit this one or do i need a custom one?
Title: Re: mysql57 custom template
Post by: ReetP on July 21, 2020, 02:29:16 PM
Ah yes it will be ignoring them then. Should i remove them?

If you don't use them yourself in a custom template then I would suggest yes so that you don't confuse yourself later....

Quote
Yes the template is exactly where you said. Can I edit this one or do i need a custom one?

If you are asking this question then I'd use a custom one - it is ALWAYS safer. :-)

Note - if you create a template you can add a bit of perl to access your new keys and make them changeable - have a look at some of the other templates so you can see how to do this.

And then you can add a bug with your mods and we can add it in to SME :-)

Ask if you need a hand on that bit - you have a Rocket login and can get me there most of the day.