Koozali.org: home of the SME Server

mysql57 custom template

Offline jameswilson

  • ****
  • 739
  • +0/-0
    • Security Warehouse, trade security equipment
mysql57 custom template
« 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

Offline jameswilson

  • ****
  • 739
  • +0/-0
    • Security Warehouse, trade security equipment
Re: mysql57 custom template
« Reply #1 on: July 21, 2020, 01:40:12 PM »
Meant to add thanks! oops

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: mysql57 custom template
« Reply #2 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

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline jameswilson

  • ****
  • 739
  • +0/-0
    • Security Warehouse, trade security equipment
Re: mysql57 custom template
« Reply #3 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?

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: mysql57 custom template
« Reply #4 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.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation