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
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.
*** Bug 73930 has been marked as a duplicate of this bug. ***