Bug #89693 improve logging during --initialize

Submitted: 16 Feb 2018 11:43 Modified: 23 Mar 2018 17:54
Reporter: Terje Røsten Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:8.0.5 OS:Any
Assigned to: CPU Architecture:Any

[16 Feb 2018 11:43] Terje Røsten
Description:
Default logging when running mysqld --initialize is:

--- start log ---

[System] [MY-010116] /export/work/mysql-trunk-clean/b/runtime_output_directory/mysqld (mysqld 8.0.6-tr) starting as process 22151 ...
[Warning] [MY-010068] CA certificate ca.pem is self signed.
[Note] [MY-010454] A temporary password is generated for root@localhost: U*pEb-Qk-6pI

---end log ---

There are several problems here:

a)  there is indication this is --initialize mode and not a normal startup
Suggested fix:

Change 

[System] [MY-010116] /export/work/mysql-trunk-clean/b/runtime_output_directory/mysqld (mysqld 8.0.6-tr) starting as process 22151 ...

to
[System] [MY-010116] /export/work/mysql-trunk-clean/b/runtime_output_directory/mysqld (mysqld 8.0.6-tr) initializing of server in progress as process 22151 

b) Message about self signed ca.pem is just spam in this context.
Suggested fix:suppress this messages when in --initialize mode.

c) There is no shutdown message present, user don't know when initialize progress is done.
Suggested fix: add 

[System] [MY-0XXXX] /export/work/mysql-trunk-clean/b/runtime_output_directory/mysqld (mysqld 8.0.6-tr) initializing of server done.

at last message to error log when shutdown after initialize is done.
 

How to repeat:
Build server as normal and run:

$ bin/mysqld --no-defaults --datadir=/tmp/a -I

watch message on standard out.

Suggested fix:
See Description.
[23 Mar 2018 17:54] Paul DuBois
Posted by developer:
 
Fixed in 8.0.12.

Logging during data directory initialization (for example, using
mysqld --initialize) has changed:

* The startup message indicates that the server is running in
  initialization mode.

* A message is written indicating when initialization has completed.

* The message about the CA certificate being self-signed is suppressed.
[3 Apr 2018 13:38] Paul DuBois
Fixed in 8.0.11, not 8.0.12.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.