Hello and mtia.
6.2
mysql 5.1.19-beta
Could someone verify that I should see these two mysql processes show.
Code:
ps -aux | grep mysql
mysql 700 0.0 0.3 1728 1316 con- I 12:49PM 0:00.04 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --da....
mysql 856 0.0 9.1 84772 35048 con- S 12:49PM 0:00.56 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysql/my.cnf --basedir=/usr/local --dat.......
The reason I ask is because this has been appearing in my logs, even immediately following a reboot.
Code:
070709 12:49:39 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
070709 12:49:39 [ERROR] Do you already have another mysqld server running on port: 3306 ?
070709 12:49:39 [ERROR] Aborting
070709 12:49:39 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.1.19-beta-log' socket: '/tmp/mysql.sock' port: 3306 FreeBSD port: mysql-server-5.1.19
070709 12:49:39 InnoDB: Starting shutdown...
070709 12:49:41 InnoDB: Shutdown completed; log sequence number 0 1869387
070709 12:49:41 [Note] /usr/local/libexec/mysqld: Shutdown complete
070709 12:49:41 mysqld ended
So just wondering if any one has come across this before. I don't know why two process would even be trying to start. I have enable in rc.conf.local and a startup script under /usr/local/etc/rc.d/mysql-server.sh, maybe thats wrong as I copied from the work dir in the ports tree.
Code:
#!/bin/sh
#
# $FreeBSD: ports/databases/mysql51-server/files/mysql-server.sh.in,v 1.4 2007/05/20 08:31:37 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 2>/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"
To my semi-trained eyes that looks ok though.
Any help is greatly appreciated. mtia
[edit] sorry about the title did not mean to leave "and my.cnf" in there.