From: Shea Martin on
I run a webserver for myself and a few friends, Solaris 10 on Ultra 10.
I have always used Postgres, but a friend wants MySQL enabled.
pkginfo | grep -i sql shows SUNWmysqlr, SUNWmysqlt, and SUNWmysqlu
installed. But I don't seem to see them in the svcs output, nor do I
see a /etc/init.d script, lying around. Do I have to roll my own? Is
/usr/sfw/sbin/mysqld_safe what I want to run?

Once I get it started, I can use generic MySQL docs to admin, but it is
the specifics to using the stuff installed with Sol10, that I need a
hint for.

I will have to rebuild my PHP, but that shouldn't be an issue.

Thx,

~S
From: Dave Uhring on
On Thu, 06 Apr 2006 23:53:38 +0000, Shea Martin wrote:

> I run a webserver for myself and a few friends, Solaris 10 on Ultra 10.
> I have always used Postgres, but a friend wants MySQL enabled.
> pkginfo | grep -i sql shows SUNWmysqlr, SUNWmysqlt, and SUNWmysqlu
> installed. But I don't seem to see them in the svcs output, nor do I
> see a /etc/init.d script, lying around. Do I have to roll my own? Is
> /usr/sfw/sbin/mysqld_safe what I want to run?

See /etc/sfw/mysql/README.solaris.mysql

From: Shea Martin on
Dave Uhring wrote:
> On Thu, 06 Apr 2006 23:53:38 +0000, Shea Martin wrote:
>
>> I run a webserver for myself and a few friends, Solaris 10 on Ultra 10.
>> I have always used Postgres, but a friend wants MySQL enabled.
>> pkginfo | grep -i sql shows SUNWmysqlr, SUNWmysqlt, and SUNWmysqlu
>> installed. But I don't seem to see them in the svcs output, nor do I
>> see a /etc/init.d script, lying around. Do I have to roll my own? Is
>> /usr/sfw/sbin/mysqld_safe what I want to run?
>
> See /etc/sfw/mysql/README.solaris.mysql
>

Perfect!

~S
From: Thommy M. on
> See /etc/sfw/mysql/README.solaris.mysql

_OR_ http://www.sun.com/bigadmin/content/submitted/mysql_smf_tip.html

I think SMF is the way to go...

From: Shea Martin on
Thommy M. wrote:
>> See /etc/sfw/mysql/README.solaris.mysql
>
> _OR_ http://www.sun.com/bigadmin/content/submitted/mysql_smf_tip.html
>
> I think SMF is the way to go...
>

I just tried putting it in SMF, but I get this error when I try to
enable it:

[ Apr 7 22:40:49 Executing start method ("/lib/svc/method/svc-mysql
start") ]
svc.startd could not set context for method: chdir: No such file or
directory
[ Apr 7 22:40:49 Method "start" exited with status 96 ]


svcprop shows that start/working_directory is :default. I assume that
this is the user's home dir. In this case the user is 'mysql', and the
home dir is /var/mysql. the perms on /var/mysql are 700, so root can't
cd there.

I used svccfg to " setprop start/working_directory='/var' ". That made
everything work correctly. I thought I would post this info for other
people who follow that guide, and have trouble.

This can be fixed in the manifest by adding a working_directory
attribute to the method_context element, like so:
<exec_method
type='method'
name='start'
exec='/lib/svc/method/svc-mysql start'
timeout_seconds='-1'>
working_directory='/var'
<method_context working_directory='/var'>
<method_credential user='mysql' group='mysql' />
</method_context>
</exec_method>


Hope this helps someone.

~S