Bug #31101 Cannot log in after solaris pkg install
Submitted: 19 Sep 2007 21:23 Modified: 26 Sep 2007 9:31
Reporter: John David Duncan Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.1.22-rc OS:Solaris (Solaris 10 X86_64 Nevada)
Assigned to: CPU Architecture:Any

[19 Sep 2007 21:23] John David Duncan
Description:
After installing 5.1.22-rc package on Solaris 10, you are not able to connect to the server (access denied)

How to repeat:
groupadd mysql
useradd mysql
pkgadd -d mysql-5.1.22-rc-solaris10-x86_64.pkg 
cd /opt/mysql/mysql 
scripts/mysql_install_db --force --user=mysql
# Note:  --force is necessary, because mysql_install_db can't find the resolveip script, and this is also a bug.
support-files/mysql.server start 
# safe_mysqld doesn't work, either, because of confusion over where the data directory is -- see bug 31058

MySQL server starts

bash-3.00# mysql
ERROR 1045: Access denied for user 'root'@'localhost' (using password: NO)
bash-3.00# type mysql
mysql is hashed (/usr/sfw/bin/mysql)
bash-3.00# /opt/mysql/mysql/bin/mysql           
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[26 Sep 2007 9:31] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

The problem happens because bug #31057. To resolve the problem start server with --skip-grant-tables option and manually edit mysql.user table: insert user root@localhost.