Bug #69843 mysql_install_db output ignores socket override
Submitted: 26 Jul 2013 1:33 Modified: 7 Aug 2013 23:11
Reporter: Alfie John Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.6 OS:Linux
Assigned to: CPU Architecture:Any
Tags: mysql_install_db

[26 Jul 2013 1:33] Alfie John
Description:
When mysql_install_db finishes, it says that change your password with:

  PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !   
  To do so, start the server, then issue the following commands:
                                                              
    ./bin/mysqladmin -u root password 'new-password'            
    ./bin/mysqladmin -u root -h dbtestnew password 'new-password

If --defaults-file was used when invoking mysql_install_db and the socket path was overridden, you'll get something along the lines of:

  /usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed         
  error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
  Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

How to repeat:
Run /bin/mysqladmin -u root password 'new-password'

Suggested fix:
Use -S <socketpath> when invoking mysqladmin on a new install
[26 Jul 2013 1:35] Alfie John
Sorry... the suggested fix should be to update the documentation to include the -S <socketpath>.
[7 Aug 2013 23:11] MySQL Verification Team
Thank you for the bug record. Workaround use --socket=path option.
[13 Aug 2013 17:34] Paul DuBois
Unassigning myself; it's a mysql_install_db bug.