Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 27709 - dev-db/mysql-4.0.14-r1 - incorrect file ownerships
Summary: dev-db/mysql-4.0.14-r1 - incorrect file ownerships
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High trivial (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-01 07:09 UTC by FieldySnuts
Modified: 2003-09-17 00:15 UTC (History)
1 user (show)

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


Attachments
Set ownership on databases when doing ebuild /var/db/.. config (mysql-4.0.14-r1.ebuild,7.11 KB, text/plain)
2003-09-06 15:47 UTC, Bryan Østergaard (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description FieldySnuts 2003-09-01 07:09:47 UTC
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.
Comment 1 FieldySnuts 2003-09-01 07:19:40 UTC
Correction: where I said mysql_intitialize_db I meant mysql_install_db.
Comment 2 Kingsley 2003-09-04 05:43:11 UTC
I had this problem too - the suggested file permissions chown fixed the problem
Comment 3 Bryan Østergaard (RETIRED) gentoo-dev 2003-09-06 15:47:19 UTC
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
Comment 4 Brian Jackson (RETIRED) gentoo-dev 2003-09-07 09:47:11 UTC
I tried kloeri's fix locally, and it worked
Comment 5 FieldySnuts 2003-09-10 04:23:59 UTC
Excellent! Thanks for the work. Now all we need is this in the offical ebuild.
Comment 6 Greg Fitzgerald (RETIRED) gentoo-dev 2003-09-16 21:57:36 UTC
fixed / now in cvs under mysql 4.0.15
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-09-16 23:34:22 UTC
Greg: this isn't in the offical tree as of me checking 5 seconds ago.
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-09-16 23:34:49 UTC
I'm working on this now.
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-09-17 00:15:05 UTC
fixed in CVS.