Summary: | dev-db/mysql-8.0.19-r1 : emerge --config =dev-db/mysql-8.0.19-r1 fails with "Failed to initialize mysql data directory" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Tor Rune Skoglund <trs> |
Component: | Current packages | Assignee: | Gentoo Linux MySQL bugs team <mysql-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexpro, bug, petr |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Tor Rune Skoglund
2020-05-10 12:45:10 UTC
I have the same bug. Perhaps this is due to '/var/tmp/portage/dev-db/mysql-8.0.19-r1' directory permissions, which is portage:portage, 700 I found a workaround to solve this problem: 1. Run "emerge --config =dev-db/mysql-8.0.19-r1", emerge will wait for input. 2. Switch to anonther console and run "chmod 755 /var/tmp/portage/dev-db/mysql-8.0.19-r1" 3. Return to emerge and continue emerge. mysql initialization will succeeds. Thank for the hint, Alexey. That works for me too. It might be that I had to do -R on chown to be sure. Can also confirm that 8.0.20 is affected by the same bug. (In reply to Tor Rune Skoglund from comment #2) > It might be that I had to do -R on chown to be sure. No, this only applies to permissions of /var/tmp/portage/dev-db/mysql-(version). All other permissions are correct, so '-R' option is not needed. Such behavior is because mysql initialization process is running from 'mysql' user and "portage:portage; 700" permissions in the middle of file path. In this case the file at the end of the path will never be available despite its own permissions. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab0818d2ba2fd2ab8efa5e1ba9bcb2503975a8b1 commit ab0818d2ba2fd2ab8efa5e1ba9bcb2503975a8b1 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-05-24 14:39:52 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-05-24 20:23:44 +0000 dev-db/mysql: fix pkg_config Bug: https://bugs.gentoo.org/722118 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> dev-db/mysql/mysql-8.0.19-r1.ebuild | 183 +++++++++++++++++++++--------------- dev-db/mysql/mysql-8.0.20.ebuild | 183 +++++++++++++++++++++--------------- 2 files changed, 212 insertions(+), 154 deletions(-) Keep in mind: You need to re-emerge the package to get the updated pkg_config code because I did not rev bump. It looks like this also affects mysql 5.7 ebuilds. I'm getting config failure of freshly installed dev-db/mysql-5.7.30: Configuring pkg... * Trying to get password for mysql 'root' user from 'mysql' section ... * Found password in 'mysql' section! * Please provide a password for the mysql 'root' user now * or through the /root/.my.cnf file. * Avoid ["'\_%] characters in the password > * Retype the password > * Creating the mysql database and setting proper permissions on it ... * Command: /usr/sbin/mysqld --initialize-insecure --init-file='/var/tmp/portage/dev-db/mysql-5.7.30/temp/tmp.neTXYCNuMh' --basedir=/usr --loose-skip-host-cache --loose-skip-name-resolve --loose-skip-networking --loose-skip-slave-start --loose-skip-federated --loose-skip-ssl --loose-skip-log-bin --loose-skip-relay-log --loose-skip-slow-query-log --loose-skip-external-locking --loose-skip-log-slave-updates --datadir=/var/lib/mysql --tmpdir=/tmp/ * ERROR: dev-db/mysql-5.7.30::gentoo failed (config phase): * Failed to initialize mysqld. Please review /var/log/mysql/mysqld.err AND /var/tmp/portage/dev-db/mysql-5.7.30/temp/mysql_install_db.log * * Call stack: * ebuild.sh, line 125: Called pkg_config * environment, line 4111: Called die * The specific snippet of code: * die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"; * * If you need support, post the output of `emerge --info '=dev-db/mysql-5.7.30::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-db/mysql-5.7.30::gentoo'`. * The complete build log is located at '/var/tmp/portage/dev-db/mysql-5.7.30/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-5.7.30/temp/environment'. * Working directory: '/var/tmp/portage/dev-db/mysql-5.7.30/temp' * S: '/var/tmp/portage/dev-db/mysql-5.7.30/work/mysql-5.7.30' # cat /var/log/mysql/mysqld.err 2020-05-31T03:55:35.318237Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2020-05-31T03:55:35.730278Z 0 [Warning] InnoDB: New log files created, LSN=45790 2020-05-31T03:55:35.807817Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. 2020-05-31T03:55:35.871866Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 954add8f-a2f2-11ea-8e79-0242ac110002. 2020-05-31T03:55:35.875275Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2020-05-31T03:55:35.982102Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. 2020-05-31T03:55:38.943892Z 1 [ERROR] Failed to open the bootstrap file /var/tmp/portage/dev-db/mysql-5.7.30/temp/tmp.neTXYCNuMh 2020-05-31T03:55:38.943930Z 1 [ERROR] 1105 Bootstrap file error, return code (0). Nearest query: 'SET @@sql_log_bin = @sql_log_bin; ' 2020-05-31T03:55:38.944152Z 0 [ERROR] Aborting The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03df35088276f459b96fddfea06753ea93b81989 commit 03df35088276f459b96fddfea06753ea93b81989 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-06-01 23:13:51 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-06-01 23:16:30 +0000 dev-db/mysql: fix pkg_config Closes: https://bugs.gentoo.org/722118 Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> dev-db/mysql/mysql-5.6.45-r2.ebuild | 15 ++++++++++++--- dev-db/mysql/mysql-5.7.30.ebuild | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) |