Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 453480 - dev-db/mysql-5.1.66 - emerge --config fails after change of datadir in my.cnf
Summary: dev-db/mysql-5.1.66 - emerge --config fails after change of datadir in my.cnf
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
: 491084 500410 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-22 06:43 UTC by tazinblack
Modified: 2014-04-25 00:18 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
logfile of emerge --config (build.log,1.86 KB, text/plain)
2013-01-22 07:17 UTC, tazinblack
Details
environment (environment,164.16 KB, text/plain)
2013-01-22 07:17 UTC, tazinblack
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tazinblack 2013-01-22 06:43:54 UTC
Initial database can't be created after change of datadir in my.cnf

Reproducible: Always

Steps to Reproduce:
1. change datadir in /etc/mysql/my.cnf
2. emerge --config =dev-db/mysql-5.1.66

Actual Results:  
Configuring pkg...

 * MySQL MY_DATADIR has changed
 * from /var/lib/mysql
 * to /data/mysql
 * Please provide a password for the mysql 'root' user now, in the
 * MYSQL_ROOT_PASSWORD env var or through the /root/.my.cnf file.
 * Avoid ["'\_%] characters in the password
    >
 * Retype the password
    >
 * Command: '/usr/bin/mysql_install_db' '--basedir=/usr' --log-warnings=0 --loose-skip-grant-tables --loose-skip-host-cache --loose-skip-name-resolve --loose-skip-networking --loose-skip-slave-start --loose-skip-innodb --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 --user=mysql
 * ERROR: dev-db/mysql-5.1.66 failed (config phase):
 *   MySQL databases not installed

Expected Results:  
It should have installed the initial database to the datadir
Comment 1 tazinblack 2013-01-22 07:17:00 UTC
Created attachment 336446 [details]
logfile of emerge --config
Comment 2 tazinblack 2013-01-22 07:17:19 UTC
Created attachment 336448 [details]
environment
Comment 3 tazinblack 2013-01-22 07:19:42 UTC
Looks like database is created and can be startet.
But no inital password is set even it is asked for while emerge --config.
Comment 4 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-11-12 23:29:12 UTC
*** Bug 491084 has been marked as a duplicate of this bug. ***
Comment 5 Brian Evans (RETIRED) gentoo-dev 2013-11-13 13:56:59 UTC
A fix has been committed to the mysql overlay.

Please fetch it, reinstall and retest.
Comment 6 Thomas Deutschmann (RETIRED) gentoo-dev 2014-01-20 00:41:57 UTC
Hi,

I run into the same problem with dev-db/mariadb-5.5.32.

After I replaced "/usr/portage/eclass/mysql-v2.eclass" with a version from the mysql overlay (HEAD from 2014-01-20) and re-emerged the package, the problem was solved.

So I think this bug report can be closed when the updated eclass will be available in the main portage tree.
Comment 7 Brian Evans (RETIRED) gentoo-dev 2014-02-05 18:52:56 UTC
*** Bug 500410 has been marked as a duplicate of this bug. ***
Comment 8 Thomas Capricelli 2014-02-05 20:39:47 UTC
Initializing first, and then moving datadir (and updating my.cnf accordingly) works here, as a workaround.