Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Sep 2005 13:43:00 -0700
From:      Glenn Dawson <glenn@antimatter.net>
To:        eoghan <freebsd@redry.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: mysql port install
Message-ID:  <6.2.3.4.2.20050926133955.05746c80@cobalt.antimatter.net>
In-Reply-To: <92AE5A80-D02C-4475-9885-7B7BC0661EEB@redry.net>
References:  <A9542760-015D-431A-9CD5-315BA5D60B7C@redry.net> <6.2.3.4.2.20050926123752.0352ad60@cobalt.antimatter.net> <F6B50E9E-24D7-4600-9518-4E64E77B7327@redry.net> <6.2.3.4.2.20050926131354.05b98e40@cobalt.antimatter.net> <92AE5A80-D02C-4475-9885-7B7BC0661EEB@redry.net>

next in thread | previous in thread | raw e-mail | index | archive | help
At 01:28 PM 9/26/2005, eoghan wrote:
>On 26 Sep 2005, at 21:17, Glenn Dawson wrote:
>
>>At 01:04 PM 9/26/2005, eoghan wrote:
>>
>>>On 26 Sep 2005, at 20:40, Glenn Dawson wrote:
>>>
>>>>Make sure you have mysqld_enable"YES" in your /etc/rc.conf and then
>>>>use
>>>>/usr/local/etc/rc.d/mysql-server.sh start
>>>>to start the server. (you may nee to copy mysql-server.sh from
>>>>mysql-server.sh.sample first)
>>>
>>>Hi Glenn
>>>Thanks! However, I get:
>>>#>/usr/local/etc/rc.d/mysql-server.sh start
>>>This: not found
>>>#>
>>>I have checked the dir and mysql-server.sh is there.
>>>Any ideas?
>>
>>Can you share the contents or your mysql-server.sh?
>>
>>Also, I'm cc'ing this over to freebsd-questions@ which is a more
>>appropriate list for this, lets continue on that list.
>>
>>-Glenn
>
>Thanks. Sorry about the wrong list! Ive copied the contents below.

I see a couple things, scroll down...


>#!/bin/sh
>#
># $FreeBSD: ports/databases/mysql41-server/files/mysql-server.sh.in,v
>1.3 2005/04/11 08:47:36 ale Exp $
>#
>
># PROVIDE: mysql
># REQUIRE: NETWORKING SERVERS
># BEFORE: DAEMON
># KEYWORD: shutdown
>
>#
># Add the following line to /etc/rc.conf to enable mysql:
># mysql_enable (bool):    Set to "NO" by default.
>#            Set it to "YES" to enable MySQL.
># mysql_limits (bool):    Set to "NO" by default.
>#            Set it to yes to run `limits -e -U mysql`
>#            just before mysql starts.
># mysql_dbdir (str):    Default to "/var/db/mysql"
>#            Base database directory.
># mysql_args (str):    Custom additional arguments to be passed
>#            to mysqld_safe (default empty).
>#
>
>. /etc/rc.subr
>
>name="mysql"
>rcvar=`set_rcvar`
>
>load_rc_config $name
>
>: ${mysql_enable="NO"}
>: ${mysql_limits="NO"}
>: ${mysql_dbdir="/var/db/mysql"}
>: ${mysql_args=""}
>
>mysql_user="mysql"
>mysql_limits_args="-e -U ${mysql_user}"
>pidfile="${mysql_dbdir}/`/bin/hostname`.pid"
>command="/usr/local/bin/mysqld_safe"
>command_args="--defaults-extra-file=${mysql_dbdir}/my.cnf --user=$ 
>{mysql_user} --

There's an extra space after --user=$

>datadir=${mysql_dbdir} --pid-file=${pidfile} $ {mysql_args} > /dev/null &"

another extra space after $ and before {mysql_args}

Not sure if those were because of the way you pasted the file, or if 
they are really there, but you'll want to check that out first.

-Glenn

>procname="/usr/local/libexec/mysqld"
>start_precmd="${name}_prestart"
>mysql_install_db="/usr/local/bin/mysql_install_db"
>mysql_install_db_args="--ldata=${mysql_dbdir}"
>
>mysql_create_auth_tables()
>{
>     eval $mysql_install_db $mysql_install_db_args >/dev/null
>         [ $? -eq 0 ] && chown -R ${mysql_user}:${mysql_user} $ {mysql_dbdir}
>}
>
>mysql_prestart()
>{
>     if [ ! -d "${mysql_dbdir}/mysql/." ]; then
>         mysql_create_auth_tables || return 1
>     fi
>     if checkyesno mysql_limits; then
>         eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null
>     else
>         return 0
>     fi
>}
>
>run_rc_command "$1"
>
>
>_______________________________________________
>freebsd-questions@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.2.3.4.2.20050926133955.05746c80>