MySQL RC script failing
Joe Auty
joe at netmusician.org
Fri Jun 23 04:31:11 UTC 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Jun 23, 2006, at 12:19 AM, Dennis Olvany wrote:
> I recall having to tinker with the rc script. Let's have a look at
> the script and also the log residing in the db root, probably /var/
> db/mysql.
> _______________________________________________
Sure!
Here is the RC script:
> #!/bin/sh
> #
> # $FreeBSD: ports/databases/mysql50-server/files/mysql-
> server.sh.in,v 1.3 2006/03/07 16:25:00 ale Exp $
> #
>
> # PROVIDE: mysql
> # REQUIRE: LOGIN
> # 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} --datadir=${mysql_dbdir} --pid-file=${pidfile} $
> {mysql_args} > /dev/null &"
> 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"
Here is the relevant snippet from my error log:
060622 23:54:39 mysqld started
060622 23:54:39 [ERROR] Can't find messagefile '/usr/local/share/
mysql/english/errmsg.sys'
060622 23:54:39 [ERROR] Aborting
060622 23:54:39 mysqld ended
This file does exist, and has the same permissions assigned to it
that my working FreeBSD machine has, so I don't think this error
message should be taken at face value.
- -----------
Joe Auty
NetMusician: web publishing software for musicians
http://www.netmusician.org
joe at netmusician.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
iD8DBQFEm26VCgdfeCwsL5ERAuXfAJwOPilCeI2b2CFDTzRjLyEF7ai8/gCfVgsz
ZKel2JXXdF0BcFJpnam+Q+w=
=Do5b
-----END PGP SIGNATURE-----
More information about the freebsd-questions
mailing list