DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th August 2010
benben159 benben159 is offline
New User
 
Join Date: Aug 2010
Posts: 2
Unhappy mysql won't run via rc.local

hi, i'm a newbie on this OpenBSD (version 4.7). i've built an ONMP (OpenBSD-Nginx-MySQL-PHP). i've installed MySQL (using `pkg_add mysql-server`), and i've put it on rc.local like this:
Code:
if [ X"${mysql}" == X"YES" -a -x /usr/local/bin/mysqld_safe ] ; then
su -c _mysql root -c `/usr/local/bin/mysqld_safe &` > /dev/null & echo -
n “ mysqld”
fi
it won't run (i've checked it on `ps aux` output). it'll run if i execute it manually from the console
Code:
$ sudo su -c _mysql root -c `/usr/local/bin/mysqld_safe &` > /dev/null
what should i do?
Reply With Quote
  #2   (View Single Post)  
Old 6th August 2010
phill phill is offline
Real Name: Philippe
Port Guard
 
Join Date: Oct 2009
Location: Belgium
Posts: 30
Default

I think the condition X"${mysql}" == X"YES" is only true if you also created a conf file containing mysql=YES. Just like rc works with rc.conf.

In my rc.local I only use the condition -x /usr/local/bin/mysqld_safe so:
if [ -x /usr/local/bin/mysqld_safe ] ; then
su -c _mysql root -c `/usr/local/bin/mysqld_safe &` > /dev/null & echo -
n “ mysqld”
fi
Reply With Quote
  #3   (View Single Post)  
Old 8th August 2010
benben159 benben159 is offline
New User
 
Join Date: Aug 2010
Posts: 2
Default

Quote:
Originally Posted by phill View Post
I think the condition X"${mysql}" == X"YES" is only true if you also created a conf file containing mysql=YES. Just like rc works with rc.conf.

In my rc.local I only use the condition -x /usr/local/bin/mysqld_safe so:
if [ -x /usr/local/bin/mysqld_safe ] ; then
su -c _mysql root -c `/usr/local/bin/mysqld_safe &` > /dev/null & echo -
n “ mysqld”
fi
i've done it before, by creating a file called rc.conf.local in /etc with
Code:
mysql=YES
in it. but it still won't run
Reply With Quote
  #4   (View Single Post)  
Old 8th August 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Only applications included with the OS use variables in the configuration files (rc.conf, rc.conf.local) with rc(8).

3rd party ports and packages do not use conf variables.

Standard practice is to use the script example provided in /usr/local/share/doc/mysql/README.OpenBSD.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
log from rc.conf.local and rc.local sdesilet OpenBSD General 1 21st January 2010 02:37 AM
/usr/local/etc/periodic does not exist ??? sniper007 FreeBSD General 3 3rd November 2009 07:36 AM
local dns (dnsmasq) bsdperson FreeBSD Ports and Packages 3 3rd September 2008 06:48 AM
proxy : replace gif with local gif milo974 OpenBSD General 4 17th July 2008 06:45 AM
/usr/local and application directories ducu_00 FreeBSD Ports and Packages 14 23rd May 2008 05:37 PM


All times are GMT. The time now is 05:41 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick