livinginthepast / smf

A Lightweight Resource Provider for SMF in Chef

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

On RHEL 6, "/sbin/service mysql-default reload" fails

nkadel-skyhook opened this issue · comments

On RHEL 6 and CentOS 6, after configuring a new mysql-default instance, reloading the daemon fails.

  • /etc/init.d/mysql-default reload # Works just fine
  • /sbin/service mysql-default reload # fails with meswsages below:
  • /sbin/service mysql-default reload
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'
    Reloading mysql-default [FAILED]

I've broken it down to this command run by /sbin/service:

  • env -i PATH=/sbin:/usr/sbin:/bin:/usr/bin TERM=xterm /etc/init.d/mysql-default reload

It loooks like the env command is clearing "HOME=/root", which is killing access to /root/.my.cnf. I'm not sure what the best way is to activate those stored credentials for the init script.

Are you sure you've filed this issue in the correct repository? SMF is the service management facility for Solaris and Illumos kernels.

Gahh, sorry, I had smf open for other reasons. I'l close it!