• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue MySQL my.ini file settings overwritten

nrep

New Pleskian
Every few months or so, there's an update to Plesk which overwrites the my.ini settings for MySQL. I have customised these settings significantly, as the defaults have waaaaay to low max connection settings for my server.

However, when these changes are overwritten, my sites are inaccessible because I get so many connection errors and poor InnoDB performance.

How can I prevent the my.ini file from being overwritten? It's not acceptable to have to restore a backup of the file each time there is a change, as suggested by the KB article:

Custom changes in my.ini file are overwritten after microupdate

This takes my sites offline for several hours each time this happens.
 
Can you please specify exactly which properties in my.ini you have customized?
In Plesk Obsidian we have fixed this issue already, I just need to confirm that your redefined options are covered by the fix.
If this fix covers all your options, then we consider backport of this fix in Plesk Onyx with next MySQL update to avoid such problems for you in future.
 
After seeing this post. I went check my settings. It did the same thing to me. I'm on Windows 2016 version 17.8.11 Update #57. I'll have to look into the settings that were reverted. But most were related to the innodb settings. As well as the read buffer sizes and max connections and max user connections.
 
Yes, they were InnoDB settings for me too. max_connections is also important.

Lost settings for me are:

default-storage-engine=INNODB
read_buffer_size=1M
read_rnd_buffer_size=256K
sort_buffer_size=256K
join_buffer_size=1M
thread_cache_size=512
key_buffer_size=64M
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size=1M
innodb_buffer_pool_size = 18G
innodb_log_file_size = 256M
innodb_thread_concurrency=0
innodb_io_capacity_max=2000
innodb_io_capacity=1500
innodb_buffer_pool_instances=8
innodb_purge_threads=1
innodb_file_per_table=1
innodb_read_io_threads=16
innodb_write_io_threads=16
innodb_ft_min_token_size = 3
innodb_ft_enable_stopword = OFF
innodb_ft_cache_size = 32M
max_connections = 512
 
I too faced this issue twice in past 2 months.

Is there any solution to avoid over written for my.ini file. in my case mysql data directly settings itself changed to default.
 
Can you please specify exactly which properties in my.ini you have customized?
In Plesk Obsidian we have fixed this issue already, I just need to confirm that your redefined options are covered by the fix.
If this fix covers all your options, then we consider backport of this fix in Plesk Onyx with next MySQL update to avoid such problems for you in future.


Any updates here? Last week my.ini was overwritten again and caused a very udnesirable down time. Was the fix released?
 
Any updates here? Last week my.ini was overwritten again and caused a very udnesirable down time. Was the fix released?

Same here. Also downtime thanks to the config reset (we normally run a HUGE innodb buffer, which was reset to a tiny one which was overwhelmed immediately).
 
Hi. It seems that this "my.ini" file is no longer overwritten, for what I can see (On 12.5 and Onyx)

However, the very last question relates to Plesk Obsidian :
"In Which "MY.INI" file" do we need to set our parameters in Plesk Obsidian ?"

  • C:\Program Files (x86)\Plesk\Databases\MySQL\my.ini (File containing some parameters, and not stating it will be overwritten : it seems to be THE FILE to write into ...)
  • C:\Program Files (x86)\Plesk\Databases\MySQL\Data\my.ini (Very light file not containing a lot)
  • C:\Program Files (x86)\Plesk\MySQL\Data\my.ini (Very light file not containing a lot)
  • C:\Program Files (x86)\Plesk\MySQL\my.ini (Stated at the top of file that these changes will be overwritten)

Thanks for your help, for me, and for the community members coming to this page !
 

Attachments

  • Which-my-ini-file.png
    Which-my-ini-file.png
    82 KB · Views: 8
MySQL that serves customer databases uses %plesk_dir%\Databases\MySQL\my.ini and that's where custom settings should go. So indeed, in your case that would be C:\Program Files (x86)\Plesk\Databases\MySQL\my.ini.

The %plesk_dir%\MySQL\my.ini is used by a different instance of MySQL, for Plesk itself.
 
Hi @Ales , thank you for this clarification. The Plesk support team came back to me today with the same information : (and this is a good thing to have two thoughts on this shamefully poorly-documented topic by Plesk) :

The file you need to modify is :
C:\Program Files (x86)\Plesk\Databases\MySQL\my.ini

Side-note : So now we know which file to use in Plesk Obsidian, noone seems to be able to tell the exact role of C:\Program Files (x86)\Plesk\Databases\MySQL\Data ...
 
You can create a custom my.ini file and place it in the /etc/mysql/conf.d directory. Plesk will not overwrite this file, so any changes you make to it will persist through updates.
 
Back
Top