Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 438038 - dev-db/mysql-5.5.27 - ?
Summary: dev-db/mysql-5.5.27 - ?
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-11 20:50 UTC by Phil Stracchino (Unix Ronin)
Modified: 2012-10-15 11:15 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Stracchino (Unix Ronin) 2012-10-11 20:50:22 UTC
The dev-db/mysql package does not properly install the mysql_install_db script.  It fairly clearly EXPECTS it to be installed in /usr/bin, because emerge --config tries to run it from there:

 * ERROR: dev-db/mysql-5.5.27 failed (config phase):
 *   Failed to run mysql_install_db. Please review /var/log/mysql/mysqld.err AND /var/tmp/portage/dev-db/mysql-5.5.27/temp/mysql_install_db.log

epsilon3:root:/var/lib:188 # cat /var/tmp/portage/dev-db/mysql-5.5.27/temp/mysql_install_db.log
/var/tmp/portage/dev-db/mysql-5.5.27/temp/environment: line 3066: //usr/bin/mysql_install_db: No such file or directory

The script is present in the image pre-merge, and is installed to /usr/share/mysql/scripts in the target filesystem.  However, emerge --config calls it from the wrong location, the directory is not on any default path, and it won't actually work if run from the installed location with default arguments:

epsilon3:root:/var/lib:24 # /usr/share/mysql/scripts/mysql_install_db

FATAL ERROR: Could not find ./bin/my_print_defaults

To get it to work, you have to both know where to find it and know to run it with --basedir:

epsilon3:root:/var/lib:31 # /usr/share/mysql/scripts/mysql_install_db --basedir=/usr
Installing MySQL system tables...
OK
Filling help tables...
OK


Reproducible: Always

Steps to Reproduce:
1. emerge dev-db/mysql
2. emerge --config dev-db/mysql
3.
Actual Results:  
An empty /var/lib/mysql directory is created by a new mysql installation.  This will leave most beginning MySQL users stranded and not knowing how to resolve the problem.

Expected Results:  
/var/lib/mysql should be correctly populated with MySQL grant tables and the performance_schema tables.

I'm flagging the severity as "major" because this is going to leave any user who does not already have a good understanding of MySQL or an existing MySQL installation dead in the water and unable to get started.  I was able to solve the problem because I knew what it was that was missing.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-10-12 16:39:24 UTC
That version is not in the portage tree.

1) Please post your `emerge --info' output in a comment.
2) Please attach the entire build log to this bug report.
Comment 2 Phil Stracchino (Unix Ronin) 2012-10-15 11:15:20 UTC
DOH!!!  You're completely correct.  I completely forgot that I'm using it from the mysql overlay.

Guess I should withdraw this.....