I want to change my MySQL's database path, but can't do this via rc.conf, because mysql-server.sh sets mysql_dbdir itself. Fix: Apply patch attached. This patch also enables to change mysql_user and uses different form of variables initialization. How-To-Repeat: Try to set mysql_dbdir in rc.conf and start mysql.
Boris Kovalenko wrote: Hello! Sorry, smal fix to previous patch. This one should be used --- mysql-server.sh.orig Fri Dec 17 16:05:48 2004 +++ mysql-server.sh Fri Dec 24 10:23:12 2004 @@ -23,17 +23,21 @@ name="mysql" rcvar=`set_rcvar` -mysql_dbdir="%%DB_DIR%%" -mysql_user="mysql" + +load_rc_config $name + +: ${mysql_enable="NO"} +: ${mysql_user="mysql"} +: ${mysqllimits_enable="NO"} +: ${mysqllimits_args="-e -U $mysql_user"} +: ${mysql_dbdir="%%DB_DIR%%"} + pidfile="${mysql_dbdir}/`/bin/hostname`.pid" command="%%PREFIX%%/bin/mysqld_safe" command_args="--user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} > /dev/null &" procname="%%PREFIX%%/libexec/mysqld" start_precmd="${name}_prestart" -[ -z "$mysql_enable" ] && mysql_enable="NO" -[ -z "$mysqllimits_enable" ] && mysqllimits_enable="NO" -[ -z "$mysqllimits_args" ] && mysqllimits_args="-e -U ${mysql_user}" mysql_prestart() { @@ -47,5 +51,4 @@ required_dirs="${mysql_dbdir}" required_files="${mysql_dbdir}/mysql/host.frm ${mysql_dbdir}/mysql/user.frm ${mysql_dbdir}/mysql/db.frm" -load_rc_config $name run_rc_command "$1" -- With respect, Boris
State Changed From-To: open->feedback To which one of the various MySQL ports does this apply?
Mark Linimon wrote: Hello! This patch may be applied to mysql40-server, mysql41-server, mysql50-server ports because they use the same startup script. >Synopsis: [PATCH] Can't assign another db path via rc.conf for MySQL > >State-Changed-From-To: open->feedback >State-Changed-By: linimon >State-Changed-When: Fri Dec 24 20:38:34 GMT 2004 >State-Changed-Why: >To which one of the various MySQL ports does this apply? > >http://www.freebsd.org/cgi/query-pr.cgi?pr=75453 > > > With respect, Boris
State Changed From-To: feedback->open Feedback received. As it turns out, the same maintainer looks after all the MySQL ports, but I probably forgot that at some point.
Responsible Changed From-To: freebsd-ports-bugs->ale
Hello! This PR is long time without response. MySQL ports were updated without review of this patch. May somebody review it and possible commit? With respect, Boris
State Changed From-To: open->closed Feature added, thanks!