Bug #80451 mysqld --initialize does not support the keyring_file_data option
Submitted: 20 Feb 2016 1:11 Modified: 27 Apr 2016 13:45
Reporter: Jesper wisborg Krogh Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.7.11 OS:Any
Assigned to: CPU Architecture:Any

[20 Feb 2016 1:11] Jesper wisborg Krogh
Description:
If you try to initialize a datadir when MySQL is configured with the keyring_file_data option, the initialization fails with

   [ERROR] unknown variable 'keyring_file_data=/mysql/spool/keyring'

How to repeat:
1. Setup my.cnf

[mysqld]
# Paths
basedir           = /usr/local/mysql
datadir           = /mysql/data
socket            = /mysql/spool/mysql.sock
pid_file          = /mysql/spool/mysql.pid
keyring_file_data = /mysql/spool/keyring

2. Initialise MySQL:

   shell$ /mysqld --defaults-file=my.cnf --initialize --log_error=install.log

3. Initialisation failed:

   shell$ cat install.log
   2016-02-20T01:07:26.008229Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
   2016-02-20T01:07:30.625417Z 0 [Warning] InnoDB: New log files created, LSN=45790
   2016-02-20T01:07:31.250348Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
   2016-02-20T01:07:31.314822Z 0 [ERROR] unknown variable 'keyring_file_data=/mysql/spool/keyring'
   2016-02-20T01:07:31.314859Z 0 [ERROR] Aborting

Suggested fix:
Support the keyring_file_data option so the configuration of MySQL can be completed before initialisation.
[20 Feb 2016 1:16] Jesper wisborg Krogh
Posted by developer:
 
The workaround is to initialise MySQL without the keyring_file_data option, then add it before starting MySQL (or restart MySQL is it's already started).
[24 Feb 2016 7:25] MySQL Verification Team
Bug #80488 marked as duplicate of this.
[18 Apr 2016 6:58] Shishir Jaiswal
Posted by developer:
 
Patch approved on RB.
[27 Apr 2016 13:45] Paul DuBois
Posted by developer:
 
Noted in 5.7.13 changelog.

Starting the server with --initialize failed if the keyring_file_data
system variable was also set at startup. To handle this, with
--initialize the server no longer skips registration of plugins
loaded with the --early-plugin-load option.