Bug in Webmin that takes MySQL down when you edit the config

**Operating system: ** Ubuntu 20.04.1

Webmin > Servers > MySQL Database Server > MySQL Server Configuration

Change “Sort buffer size” from
[*] Default

to
[*] 1 [Mb]

Save and Restart MySQL

Results in a wrecked MySQL that can not start.
Upon investigation it looks like Webmin wrote garbage into /etc/mysql/mysql.conf.d/mysqld.cnf

set-variable = sort_buffer_size=1M

That’s invalid and stopped MySQL from being able to start, which in turn leaves the entire MySQL admin section of Webmin inaccessible, and therefor impossible to even attempt to revert the change through Webmin’s UI.

Manually editing that file so the line reads:
sort_buffer_size=1M

allowed MySQL to be able to restart. Chasing down where that setting was actually edited in the filesystem was … fun.

Well, that’s ugly. Thanks for the heads up.

@Jamie seen this?

No worries, fortunately tracked down what was going on and fortunately I was doing this way after office hours in case something went screwy (it pays to be paranoid) - so little real damage done. Thought you should know!

Cheers, and as it’s 22:30 here, also goodnight! :slight_smile:

Interesting, in order MySQL versions set-variable was required.

Which MySQL version are you running there?

It’s the standard stuff installed by the VirtualMin install script.

root@server:~# mysql --version
mysql Ver 8.0.27-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))

The file itself /etc/mysql/mysql.conf.d/mysqld.cnf looks like this (though I’ve removed a ton of whitespace lines)

[mysqld]
user = mysql
bind-address = 127.0.0.1
mysqlx-bind-address = 127.0.0.1
key_buffer_size = 16M
myisam-recover-options = BACKUP
log_error = /var/log/mysql/error.log
max_binlog_size = 100M
sort_buffer_size=1M

Hi I would doubt it wend down - for most and easier - no sql is used on your system.rest is not used at all…