Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 71432 - Incorrect post install instruction by mysql ebuild
Summary: Incorrect post install instruction by mysql ebuild
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
: 73930 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-16 12:53 UTC by Jeremy Stark
Modified: 2004-12-23 02:14 UTC (History)
1 user (show)

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 Jeremy Stark 2004-11-16 12:53:21 UTC
The post install instructions include instructions for setting the root password, specificaly the lines:

/usr/bin/mysqladmin -u root -h apps.deximer.com password 'new-password'
/usr/bin/mysqladmin -u root password 'new-password'

The second instruction should include a -p as in:

/usr/bin/mysqladmin -p -u root password 'new-password'

Reproducible: Always
Steps to Reproduce:
1. emerge mysql
2. attempt to set root password as per ebuild instructions
3.

Actual Results:  
error: 'Access denied for user: 'root@localhost' (Using password: NO)'

Expected Results:  
Passwords updated succefully
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-12-23 02:13:27 UTC
No.
It only needs the -p if you are connecting in the context that you just set the first password for.

The instructions aren't printed out by the ebuild, but by mysql_install_db (which is called in the pkg_config section).
The original upstream instructions are these (in this order)
echo "$bindir/mysqladmin -u root password 'new-password'"
echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"

This would fail also because of the missing -p, but it would fail more often than the other route, depending on the context you are connecting to mysql in.

We purposefully changed the order:
echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"
echo "$bindir/mysqladmin -u root password 'new-password'"

where hostname is something non-local.
after the first instruction, the password for root@localhost SHOULD still be empty, unless your $hostname resolves the same as localhost, in which case it would need the password from the first statement to connect.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-12-23 02:14:34 UTC
*** Bug 73930 has been marked as a duplicate of this bug. ***