Bug #115573 mysql_secure_installation: unknown variable default-character-set=utf8mb4
Submitted: 12 Jul 10:48 Modified: 12 Jul 13:08
Reporter: Mihail Mihaylov Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.4 OS:Red Hat
Assigned to: CPU Architecture:x86

[12 Jul 10:48] Mihail Mihaylov
Description:
Hi,

I am installing MySQL community server 8.4.1 on a RHEL9 server. After starting it with 'systemctl start mysqld' I am doing '/usr/bin/mysql_secure_installation' and the below error is displayed:

mysql_secure_installation: [ERROR] unknown variable 'default-character-set=utf8mb4'.

I can successfully finish the installation script:

Securing the MySQL server deployment.

Enter password for user root:

etc...etc.

I have this in my configuration:

[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
default-character-set = utf8mb4

I tried moving 'default-character-set = utf8mb4' to the [mysql] section but I got the same error.

I am reading that it's available: https://dev.mysql.com/doc/refman/8.4/en/mysql-command-options.html#option_mysql_default-ch...

NOTES: 
No error if I login to the mysql server with mysql console client.
No such error in MySQL community 8.0 when running mysql_secure_installation.

How to repeat:
Install mysql-community-server 8.4.1 on RHEL9

Add to my.cnf:
[client]
default-character-set = utf8mb4

Start mysql_secure_installation
[12 Jul 11:08] MySQL Verification Team
Hi Mr. Mihaylov,

Thank you very much for your bug report.

However, we were not able to repeat it with our official mysql 8.4.1 binaries, available from htttps://dev.mysql.com.

We have set:

default_character_set=utf8mb4

under both [client] and [mysql] headers and we connected without any problems and ran a number of commands very successfully.

Hence, first try our binaries, then try using underscore '_' instead of dash '-'.

It all just worked fine for us.

Can't repeat.
[12 Jul 11:25] Mihail Mihaylov
Hi,

thank you for your reply.

I am using the rpm packages provided here:
http://repo.mysql.com/yum/mysql-8.4-community/el/9/x86_64/

I've tried with underscore instead of dash in both sections, but got the same error:

# /usr/bin/mysql_secure_installation
mysql_secure_installation: [ERROR] unknown variable 'default_character_set=utf8mb4'.

Regards!
[12 Jul 12:11] MySQL Verification Team
Hi Mr. Mihaylov,

We still can not repeat the behaviour that you reported.

Please use the packages from this link:

https://dev.mysql.com/downloads/mysql/

Choose "8.4.1" and choose "Red Hat Linux/ Oracle Linux"

Can't repeat.
[12 Jul 13:08] Mihail Mihaylov
Hi,

the repo rpm provides the same source for the rpms: https://dev.mysql.com/downloads/file/?id=528548

It installs repos, one of which is:
[mysql-8.4-lts-community]
name=MySQL 8.4 LTS Community Server
baseurl=http://repo.mysql.com/yum/mysql-8.4-community/el/9/$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2023

Did you actually try the 'mysql_secure_installation' script?
[15 Jul 9:34] MySQL Verification Team
Hi Mr. Mihaylov,

We definitely have to try to repeat the behaviour that was reported.

We ran the script several times on 8.4.1.