[MDEV-18646] mysqld ignoring character_set_server and collation_server directives in config files Created: 2019-02-19 Updated: 2019-03-26 Resolved: 2019-03-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets, Configuration |
| Affects Version/s: | 10.3.12 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | VL Incans | Assignee: | Vladislav Vaintroub |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | configuration | ||
| Environment: |
Host: VMWare Mariadb: mysql Ver 15.1 Distrib 10.3.12-MariaDB, for Win64 (AMD64), source revision faf206a848684bc0f87c93a2b47a55063bbccc6c |
||
| Description |
|
I spent several days grappling with "character encoding hell" trying to get my mariadb setup "unicode clean". Having found the recommended incantation in the Mariadb docs at I decided to upgrade to the latest stable version (10.3.12) to try to finalise things, but this seems to have caused a regression. In 10.3.12 with an unchanged config the system is ignoring the character_set_server and collation_server directives in the config files, and reporting both these settings as the default (latin1 and latin1_swedish_ci respectively) on startup. Config files are as below (all except C:\my.cnf that contains a default database, user and password for my dev account) C:\Program Files\MariaDB 10.3\my.cnf
C:\Program Files\MariaDB 10.3\data\my.ini
Server state after restarting the MySQL service-
|
| Comments |
| Comment by Vladislav Vaintroub [ 2019-02-20 ] |
|
Just have all of charset variables in my.ini . mysqld does not read both my.ini and my.cnf. It reads either/or |
| Comment by VL Incans [ 2019-02-24 ] |
|
I am confused by this comment @Vladislav Vaintroub
If you can refer me to the section of the Mariadb docs where it describes this behaviour then of course i'll have to accept it's true, but at this point it is not my understanding of how the system is expected to work. |
| Comment by Vladislav Vaintroub [ 2019-02-25 ] |
|
I've tested once again, and indeed the comment was misleading and confusing. sorry for that. All When you run installed, or mysql_install_db.exe, as service, the server is started --defaults-file=C:\path\to\datadir\my.ini . And only this file is read, rather than everything in the default search. "MariaDB x.y (x64) command line" , the shortcut to the "root" command line, uses --defaults-file as well, thus no search path is used. If you just start mysql.exe from the command line, it uses the default search path. In any case, if you install as service, server parameters need to be in the above --defaults-file. The default path search (if used) has not changed for a long time. The mysql_install_db.exe, the tool that is used when MSI installs a db, used --defaults-file, this did not use default search path, from the time it was created. The idea behind --defaults-file use is that you can use multiple versions of MariaDB, and they do not conflict with one another. Hope this helps. |
| Comment by VL Incans [ 2019-02-28 ] |
|
Thank you @Vladislav Vaintroub, this is beginning to make some sense now.
A couple of notes-
However the key thing is my installation is now working as expected. Thank you very much for your help. |
| Comment by Elena Stepanova [ 2019-03-11 ] |
|
Assigning to wlad in case he wants to address any of the issues above. Otherwise please close. |