in your case datadir should be taken
from /etc/mysql/percona-server.conf.d/mysqld.cnf and it is default config
file.
On Fri, Jul 21, 2017 at 6:45 PM, Maxime de Roucy <<email address hidden>
> wrote:
> root@test:~# cat /etc/apt/sources.list.d/percona.list
> deb http://repo.percona.com/apt jessie main
>
> root@test:~# dpkg -l percona-server-server-5.7
> Desired=Unknown/Install/Remove/Purge/Hold
> | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/
> trig-aWait/Trig-pend
> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
> ||/ Name Version
> Architecture Description
> +++-===============================================-========
> ====================-============================-==========
> ============================================================
> =============================
> ii percona-server-server-5.7 5.7.18-15-1.jessie
> amd64 Percona Server database server binaries
>
> --
> You received this bug notification because you are a member of Percona
> core, which is subscribed to Percona Server.
> https://bugs.launchpad.net/bugs/1705729
>
> Title:
> dpkg: percona-server-server-5.7.postinst fail to find the right
> MYSQLDATA
>
> Status in Percona Server:
> New
>
> Bug description:
> On debian jessie, I have :
>
> root@test:~# grep -v '^#' /etc/mysql/my.cnf
> !includedir /etc/mysql/percona-server.conf.d/
> !includedir /etc/mysql/conf.d/
> root@test:~# grep datadir /etc/mysql/percona-server.conf.d/*
> /etc/mysql/percona-server.conf.d/mysqld.cnf:datadir = /var/lib/mysql
> root@test:~# grep datadir /etc/mysql/conf.d/*
> datadir = /space/mysql
>
> so the right datadir is /space/mysql.
>
> From https://dev.mysql.com/doc/refman/5.7/en/option-files.html :
>
> If multiple instances of a given option are found, the last instance
> takes precedence, with one
> exception: For mysqld, the first instance of the --user option is used
> as a security precaution, to
> prevent a user specified in an option file from being overridden on
> the command line.
>
> In /var/lib/dpkg/info/percona-server-server-5.7.postinst :
>
> MYSQLDATA=$(my_print_defaults mysqld | grep datadir | cut -d= -f2)
>
> root@test:~# my_print_defaults mysqld | grep datadir | cut -d= -f2
> /var/lib/mysql
> /space/mysql
>
> In /var/lib/dpkg/info/percona-server-server-5.7.postinst to determine
> if the datadir is empty :
>
> [ ! "$(ls -A ${MYSQLDATA})" ]
>
> but :
>
> root@test:~# ls -A /space/mysql
> root@test:~# ls -A /var/lib/mysql /space/mysql
> /space/mysql:
>
> /var/lib/mysql:
>
> So the test fail even if the datadir is empty.
>
> What I propose :
>
> MYSQLDATA=$(my_print_defaults mysqld | grep -- '--datadir=' | tail
> -n 1 | cut -d= -f2)
>
> root@test:~# my_print_defaults mysqld | grep -- '--datadir=' | tail -n
> 1 | cut -d= -f2
> /space/mysql
>
> --
> Regards
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/percona-server/+bug/1705729/+subscriptions
>
> Launchpad-Notification-Type: bug
> Launchpad-Bug: product=percona-server; status=New; importance=Undecided;
> assignee=None;
> Launchpad-Bug-Tags: pkg
> Launchpad-Bug-Information-Type: Public
> Launchpad-Bug-Private: no
> Launchpad-Bug-Security-Vulnerability: no
> Launchpad-Bug-Commenters: mderoucy
> Launchpad-Bug-Reporter: Maxime de Roucy (mderoucy)
> Launchpad-Bug-Modifier: Maxime de Roucy (mderoucy)
> Launchpad-Message-Rationale: Subscriber (Percona Server) @percona-core
> Launchpad-Message-For: percona-core
>
in your case datadir should be taken percona- server. conf.d/ mysqld. cnf and it is default config
from /etc/mysql/
file.
On Fri, Jul 21, 2017 at 6:45 PM, Maxime de Roucy <<email address hidden>
> wrote:
> root@test:~# cat /etc/apt/ sources. list.d/ percona. list repo.percona. com/apt jessie main server- server- 5.7 Unknown/ Install/ Remove/ Purge/Hold Not/Inst/ Conf-files/ Unpacked/ halF-conf/ Half-inst/ Trig-pend /Reinst- required (Status,Err: uppercase=bad) ======= ======= ======= ======= ======= ======= ==-==== ==== ======= ======- ======= ======= ======= ======= -====== ==== ======= ======= ======= ======= ======= ======= ======= ==== ======= ======= ======= = server- server- 5.7 5.7.18-15-1.jessie /bugs.launchpad .net/bugs/ 1705729 server- server- 5.7.postinst fail to find the right percona- server. conf.d/ percona- server. conf.d/ * percona- server. conf.d/ mysqld. cnf:datadir = /var/lib/mysql /dev.mysql. com/doc/ refman/ 5.7/en/ option- files.html : dpkg/info/ percona- server- server- 5.7.postinst : $(my_print_ defaults mysqld | grep datadir | cut -d= -f2) dpkg/info/ percona- server- server- 5.7.postinst to determine $(my_print_ defaults mysqld | grep -- '--datadir=' | tail /bugs.launchpad .net/percona- server/ +bug/1705729/ +subscriptions Notification- Type: bug percona- server; status=New; importance= Undecided; Bug-Information -Type: Public Bug-Private: no Bug-Security- Vulnerability: no Bug-Commenters: mderoucy Bug-Reporter: Maxime de Roucy (mderoucy) Bug-Modifier: Maxime de Roucy (mderoucy) Message- Rationale: Subscriber (Percona Server) @percona-core Message- For: percona-core
> deb http://
>
> root@test:~# dpkg -l percona-
> Desired=
> | Status=
> trig-aWait/
> |/ Err?=(none)
> ||/ Name Version
> Architecture Description
> +++-===
> =======
> =======
> =======
> ii percona-
> amd64 Percona Server database server binaries
>
> --
> You received this bug notification because you are a member of Percona
> core, which is subscribed to Percona Server.
> https:/
>
> Title:
> dpkg: percona-
> MYSQLDATA
>
> Status in Percona Server:
> New
>
> Bug description:
> On debian jessie, I have :
>
> root@test:~# grep -v '^#' /etc/mysql/my.cnf
> !includedir /etc/mysql/
> !includedir /etc/mysql/conf.d/
> root@test:~# grep datadir /etc/mysql/
> /etc/mysql/
> root@test:~# grep datadir /etc/mysql/conf.d/*
> datadir = /space/mysql
>
> so the right datadir is /space/mysql.
>
> From https:/
>
> If multiple instances of a given option are found, the last instance
> takes precedence, with one
> exception: For mysqld, the first instance of the --user option is used
> as a security precaution, to
> prevent a user specified in an option file from being overridden on
> the command line.
>
> In /var/lib/
>
> MYSQLDATA=
>
> root@test:~# my_print_defaults mysqld | grep datadir | cut -d= -f2
> /var/lib/mysql
> /space/mysql
>
> In /var/lib/
> if the datadir is empty :
>
> [ ! "$(ls -A ${MYSQLDATA})" ]
>
> but :
>
> root@test:~# ls -A /space/mysql
> root@test:~# ls -A /var/lib/mysql /space/mysql
> /space/mysql:
>
> /var/lib/mysql:
>
> So the test fail even if the datadir is empty.
>
> What I propose :
>
> MYSQLDATA=
> -n 1 | cut -d= -f2)
>
> root@test:~# my_print_defaults mysqld | grep -- '--datadir=' | tail -n
> 1 | cut -d= -f2
> /space/mysql
>
> --
> Regards
>
> To manage notifications about this bug go to:
> https:/
>
> Launchpad-
> Launchpad-Bug: product=
> assignee=None;
> Launchpad-Bug-Tags: pkg
> Launchpad-
> Launchpad-
> Launchpad-
> Launchpad-
> Launchpad-
> Launchpad-
> Launchpad-
> Launchpad-
>
--
Sincerely,
Evgeniy Patlan
Build/Release Engineer, Percona (UTC+3)
phone: 1-919-296-8685
skype: percona.epatlan