Configuring pkg... * MySQL MY_DATADIR has changed * from /var/lib/postgresql/mysql * to /var/lib/postgresql/mysql2 * You have already a MySQL database in place. * (///var/lib/postgresql/mysql/*) * Please rename or delete it if you wish to replace it. * ERROR: dev-db/mysql-5.5.22-r1 failed (config phase): * MySQL database already exists! * * Call stack: * ebuild.sh, line 85: Called pkg_config * environment, line 3189: Called mysql-v2_pkg_config * environment, line 2815: Called die * The specific snippet of code: * die "MySQL database already exists!"; * * If you need support, post the output of `emerge --info '=dev-db/mysql-5.5.22-r1'`, * the complete build log and the output of `emerge -pqv '=dev-db/mysql-5.5.22-r1'`. * This ebuild is from an overlay named 'gentoo': '/var/db/pkg/' * The complete build log is located at '/var/tmp/portage/dev-db/mysql-5.5.22-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-5.5.22-r1/temp/environment'. * Working directory: '/var/tmp/portage/dev-db/mysql-5.5.22-r1' * S: '/var/tmp/portage/dev-db/mysql-5.5.22-r1/work/mysql-5.5.22' The above output is after adjusting datadir in /etc/mysql/my.cnf If you are configuring MySQL to a new location it existing in a previous place should not make emerge --config fail.
A fix involving moving datadir during --config has been committed to the mysql overlay. Please pull it, recompile and retest.