Bug #86007 --pid-file did not define the parameters as we specified
Submitted: 19 Apr 2017 14:13 Modified: 20 Apr 2017 1:25
Reporter: xiangbo zhang Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.7.16 OS:Any (pid--file)
Assigned to: CPU Architecture:Any
Tags: Pid-file

[19 Apr 2017 14:13] xiangbo zhang
Description:
we specified the parameters  in the [mysqld] of the my.cnf like this
pid-file=/opt/mysql/data/mysql.pid ,but in fact, ps -ef  it is   --pid-file=/opt/mysql/data/localhost.pid ,i think it will depend on the hostname  and is not a good habit.
if in the future one day I modified the host name, it will give me an error,And its definition does not like the describe in the document  "--pid-file=file_name".
i think it's a little bug.we will be misunderstand easily.

How to repeat:
as we known ,we can modify the 258 line of the file which named mysqld(start mysqld ,we copy the file from $basedir/support-files/mysql.server)
modify "mysqld_pid_file_path=$datadir/`hostname`.pid" to "mysqld_pid_file_path=$datadir/pid" ,relieve dependency from the hostname.

but,don't known how to modify the correct definition as he specified the meaning.

Thanks!
[19 Apr 2017 16:25] Miguel Solorzano
Please try version 5.7.18. Thanks.

https://bugs.mysql.com/bug.php?id=84172
[20 Apr 2017 1:25] xiangbo zhang
thinks a lot