Description:
As per documentation:
https://dev.mysql.com/doc/mysql-startstop-excerpt/5.7/en/mysqld-safe.html#option_mysqld_sa...
In MySQL 5.7.2 and later, mysqld_safe creates a PID file named mysqld_safe.pid in the MySQL data directory when starting up (Bug #16776528).
So it should be already fixed in 5.7.2 version
Cloned from Github repo:
cmake -DCMAKE_INSTALL_PREFIX=/opt/mysql-5.7 -DMYSQL_DATADIR=/opt/mysql-5.7/datadir -DSYSCONFDIR=/opt/ -DWITH_SSL=system -DMYSQL_TCP_PORT=3308 -DMYSQL_UNIX_ADDR=/opt/mysql-5.7/mysqld.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_DEBUG=1 -DCOMPILATION_COMMENT="Shahriyar Rzayev's MySQL Server" -DOPTIMIZER_TRACE=1 -DWITH_ZLIB=system -DWITH_VALGRIND=1 -DCMAKE_C_FLAGS=-DHAVE_purify -DCMAKE_CXX_FLAGS=-DHAVE_purify -DWITH_BOOST=/opt/boost
make
make install
Started as:
[root@mysql-57 mysql-5.7]# bin/mysqld_safe --defaults-file=./my.cnf
160128 07:59:15 mysqld_safe Logging to '/opt/mysql-5.7/datadir/error.err'.
160128 07:59:15 mysqld_safe Starting mysqld daemon with databases from /opt/mysql-5.7/datadi
my.cnf file:
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
log-error=/opt/mysql-5.7/datadir/error.err
datadir=/opt/mysql-5.7/datadir
basedir=/opt/mysql-5.7
plugin-dir=/opt/mysql-5.7/lib/mysql/plugin
user=mysql
pid-file=/opt/mysql-5.7/datadir/mysqld.pid
socket=/opt/mysql-5.7/datadir/mysqld.sock
port=3308
Version:
[root@mysql-57 mysql-5.7]# bin/mysql --version
bin/mysql Ver 14.14 Distrib 5.7.10, for Linux (x86_64) using EditLine wrapper
Result:
[root@mysql-57 datadir]# ls | grep mysqld_safe
mysqld_safe.pid
How to repeat:
See description
Suggested fix:
Maybe it is a regression or misdocumented/open issue
Page generated in 0.051 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.