On 17 Nov 2007, at 00:01, Jyri Virkki wrote:

> 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.

That's the right place to put it - but you have to be careful about  
file permissions, otherwise any user and read the file and login to  
MySQL as the 'root' user :)

MC


--
Martin 'MC' Brown, mc at mcslp.com
Everything MCslp: http://planet.mcslp.com



Reply via email to