Bug 192657 - databases/mysql56-server: The rc script fails to (one)start
Summary: databases/mysql56-server: The rc script fails to (one)start
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Mark Felder
URL:
Keywords: patch
Depends on: 216244
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-14 17:50 UTC by Harry Weppner
Modified: 2017-01-26 19:58 UTC (History)
5 users (show)

See Also:
vlad-fbsd: maintainer-feedback? (ale)


Attachments
mysql-server rc script patch to pass mysql_user to mysql_install_db (586 bytes, patch)
2014-08-14 17:50 UTC, Harry Weppner
no flags Details | Diff
backported fix from databases/mysql57 (872 bytes, patch)
2016-05-18 20:16 UTC, Markus Kohlmeyer
rootservice: maintainer-approval? (ale)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harry Weppner 2014-08-14 17:50:49 UTC
Created attachment 145781 [details]
mysql-server rc script patch to pass mysql_user to mysql_install_db

With mysql56, the rc script attempts to bootstrap using mysql_install_db  but the created directories mysql/ and test/ are not chown'ed to the mysql user and thus cause subsequent failures.

I believe the mysql_install_db (perl) script expects the user option to be passed. The attached patch fixes this issue.

Thanks & cheerio, Harry.
Comment 1 John Marino freebsd_committer 2014-08-14 20:23:01 UTC
over to maintainer
Comment 2 Harry Weppner 2014-10-30 18:28:33 UTC
Hi Alex,

can you please incorporate this fix – I am continued to get user complaints :-/

Thanks & cheerio, Harry.
Comment 3 Harry Weppner 2015-02-25 01:06:58 UTC
Can _someone_ please incorporate this patch!?

Thanks & cheerio, Harry.
Comment 4 Alex Dupre freebsd_committer 2015-02-26 09:54:30 UTC
The created directories *are* chown'ed by mysql user:

mysql_create_auth_tables()
{
 	eval $mysql_install_db $mysql_install_db_args >/dev/null 2>/dev/null
 	[ $? -eq 0 ] && chown -R ${mysql_user}:${mysql_user} ${mysql_dbdir}
}

and in fact it works for 99.9% of users. Please investigate why it's not working for you.
Comment 5 Harry Weppner 2015-02-27 19:14:43 UTC
Hi Alex,

mySQL introduced a regression of http://bugs.mysql.com/bug.php?id=36462. It re-occured after switching from a shell to a Perl-based installation (bootstraping) script. The original mySQL fix for the shell script was http://lists.mysql.com/commits/70593.

Cheerio, Harry.
Comment 6 Markus Kohlmeyer 2016-05-18 20:16:29 UTC
Created attachment 170458 [details]
backported fix from databases/mysql57


Fix backported from databases/mysql57

Tested, ready to commit
Comment 7 Harry Weppner 2016-05-19 16:53:53 UTC
Hi Markus,

although nearly two years after submitting the original patch is an unacceptable timeframe, I am glad it (eventually) got resolved.

Thanks for picking it up!

Cheerio, Harry.
Comment 8 VK freebsd_triage 2016-05-30 11:23:34 UTC
Comment on attachment 145781 [details]
mysql-server rc script patch to pass mysql_user to mysql_install_db

Obsoleting this as it's not a patch against the files in the tree.
Comment 9 VK freebsd_triage 2016-05-30 11:25:47 UTC
Setting proper maintainer feedback query.
Comment 10 VK freebsd_triage 2016-05-30 11:26:48 UTC
Comment on attachment 170458 [details]
backported fix from databases/mysql57

Setting approval request from proper maintainer.
Comment 11 Harry Weppner 2016-09-23 14:41:00 UTC
Could the maintainer please incorporate the fix? Thanks!
Comment 12 commit-hook freebsd_committer 2017-01-19 22:30:00 UTC
A commit references this bug:

Author: feld
Date: Thu Jan 19 22:29:06 UTC 2017
New revision: 431919
URL: https://svnweb.freebsd.org/changeset/ports/431919

Log:
  databases/mysql56: Update to 5.6.35

  - Port improvements from MySQL 5.7 port
  - Use system libs instead of bundled
  - Fix many open PRs
  - Change MAINTAINER

  PR:		216244 192657 198812 199751 205093
  PR:		209618 211248 205983 209338

Changes:
  head/databases/mysql56-client/Makefile
  head/databases/mysql56-client/files/patch-CMakeLists.txt
  head/databases/mysql56-client/files/patch-extra_CMakeLists.txt
  head/databases/mysql56-client/files/patch-man_CMakeLists.txt
  head/databases/mysql56-client/files/patch-mysys_ssl_my_default.cc
  head/databases/mysql56-client/files/patch-scripts_CMakeLists.txt
  head/databases/mysql56-client/files/patch-support-files_CMakeLists.txt
  head/databases/mysql56-client/pkg-message
  head/databases/mysql56-server/Makefile
  head/databases/mysql56-server/distinfo
  head/databases/mysql56-server/files/my.cnf.sample.in
  head/databases/mysql56-server/files/mysql-server.in
  head/databases/mysql56-server/files/patch-mysys_ssl_my_default.cc
  head/databases/mysql56-server/pkg-message
  head/databases/mysql56-server/pkg-plist
Comment 13 commit-hook freebsd_committer 2017-01-26 19:58:22 UTC
A commit references this bug:

Author: brnrd
Date: Thu Jan 26 19:58:06 UTC 2017
New revision: 432535
URL: https://svnweb.freebsd.org/changeset/ports/432535

Log:
  MFH: r431919 r431968 r431975 r432035 r432066 r432458

  databases/mysql56: Update to 5.6.35

  - Port improvements from MySQL 5.7 port
  - Use system libs instead of bundled
  - Fix many open PRs
  - Change MAINTAINER

  PR:		216244 192657 198812 199751 205093
  PR:		209618 211248 205983 209338

  databases/mysql56-server: Rollback rc script changes

  databases/mysql56-server: Do not install my.cnf sample

  An issue was discovered where users of mysql did not have a my.cnf and
  the recent update was causing mysqld to find a sample my.cnf and load
  its parameters. This was causing errors on startup for users of innodb
  as the parameters used to init the database did not match the ones in
  the sample config file it was now reading.

  databases/mysql56-server: Fix build with LibreSSL

    - Fix CMake SSL detection
    - Always set WITH_SSL=${OPENSSLBASE}

  PR:		216311
  Approved by:	Mahdi Moktari <mokhi64@gmail.com> (maintainer)
  Differential Revision:	D9272

  Revert r432035 part 2, it breaks build with openssl from base

  With hat:	portmgr

  databases/mysql56-server: Fix OpenSSL linking

    - Force dynamic linking with OpenSSL

  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2017Q1/
  branches/2017Q1/databases/mysql56-client/Makefile
  branches/2017Q1/databases/mysql56-client/files/patch-CMakeLists.txt
  branches/2017Q1/databases/mysql56-client/files/patch-cmake_ssl.cmake
  branches/2017Q1/databases/mysql56-client/files/patch-extra_CMakeLists.txt
  branches/2017Q1/databases/mysql56-client/files/patch-man_CMakeLists.txt
  branches/2017Q1/databases/mysql56-client/files/patch-mysys_ssl_my_default.cc
  branches/2017Q1/databases/mysql56-client/files/patch-scripts_CMakeLists.txt
  branches/2017Q1/databases/mysql56-client/files/patch-support-files_CMakeLists.txt
  branches/2017Q1/databases/mysql56-client/pkg-message
  branches/2017Q1/databases/mysql56-server/Makefile
  branches/2017Q1/databases/mysql56-server/distinfo
  branches/2017Q1/databases/mysql56-server/files/my.cnf.sample.in
  branches/2017Q1/databases/mysql56-server/files/patch-cmake_ssl.cmake
  branches/2017Q1/databases/mysql56-server/files/patch-mysys_ssl_my_default.cc
  branches/2017Q1/databases/mysql56-server/pkg-message
  branches/2017Q1/databases/mysql56-server/pkg-plist