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
Created attachment 336446 [details] logfile of emerge --config
Created attachment 336448 [details] environment
Looks like database is created and can be startet. But no inital password is set even it is asked for while emerge --config.
*** Bug 491084 has been marked as a duplicate of this bug. ***
A fix has been committed to the mysql overlay. Please fetch it, reinstall and retest.
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.
*** Bug 500410 has been marked as a duplicate of this bug. ***
Initializing first, and then moving datadir (and updating my.cnf accordingly) works here, as a workaround.