After installing dev-db/mysql-4.0.14-r1, initializing the tables with mysql_initialize_db, creating a my.cnf (copy of the default in this case), and trying to start it via /etc/init.d/mysql start, mysql was not running. mysql.err shows items smiliar to: 030901 10:02:35 mysqld started Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line 030901 10:02:35 Fatal error: Can't open privilege tables: File './mysql/host.MYD' not found (Errcode: 13) 030901 10:02:35 Aborting 030901 10:02:35 /usr/sbin/mysqld: Shutdown Complete 030901 10:02:36 mysqld ended Closer investigation showed this file, in /var/lib/mysql/mysql/ , owned by user root and group root, mode 660. mysql runs as user mysql group mysql. I did a chown mysql.mysql on that one file, did /etc/init.d/mysql zap / start, and error logs show another file in that same directory unreadable. Performing chown -R mysql.mysql /var/lib/mysql/mysql solved this problem, and operation then continues as normal. So all we have to do is install these files as owned by mysql.mysql and I think we're all set.
Correction: where I said mysql_intitialize_db I meant mysql_install_db.
I had this problem too - the suggested file permissions chown fixed the problem
Created attachment 17192 [details] Set ownership on databases when doing ebuild /var/db/.. config Adds chowning of databases created by mysql_install_db. If /etc/mysql/my.cnf exists, datadir is extracted from it - otherwise datadir defaults to /var/lib/mysql
I tried kloeri's fix locally, and it worked
Excellent! Thanks for the work. Now all we need is this in the offical ebuild.
fixed / now in cvs under mysql 4.0.15
Greg: this isn't in the offical tree as of me checking 5 seconds ago.
I'm working on this now.
fixed in CVS.