Ritu Kamboj wrote:
>
> >usr/src/cmd/mysql-5-0/Solaris/mysql:
> >
> >40 #set your root password here
> >41 password="";
> >
> >First, this is not a user editable file so it can't have editable content.
> >Aside from that, a password certainly doesn't belong there!
> >What's the intent? It's only used by stop.
> 
> When the user disables the service,it invokes mysqladmin tool to 
> shutdown the database which needs a password. Hence if the default 
> password (which is no password) is changed, it needs to be set here. It 

No, it cannot be set there. /lib/svc/method/* files are not the place
for user-editable configuration. Remove lines 40-41.

Looking at the docs, MySQL support a 'password' directive in the mysql
config files under '[client]' section (with the file suitably
protected). Sounds like the alternative to document for now.

> >mysql_restart() sleeps until the process disappears. Doesn't this hang
> >forever if the process doesn't exit gracefully for whatever reason?
> >Look at /lib/svc/method/nfs-server for an alternative which seems
> >more reliable?

I just noticed that not only will it sleep forever if the server
doesn't shutdown for whatever reason, more generally, it'll sleep
forever if the 'pgrep mysqld' matches anything.. such as someone
else's process also called mysqld.


-- 
Jyri J. Virkki - jyri.virkki at sun.com - Sun Microsystems

Reply via email to