Skip to content

Instantly share code, notes, and snippets.

@techwolf359
Created October 7, 2014 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techwolf359/a323d122547359497be1 to your computer and use it in GitHub Desktop.
Save techwolf359/a323d122547359497be1 to your computer and use it in GitHub Desktop.
Percona's mysql.init modified to look at the filename for datadir hint
62,65d61
< # get instance name
< script_name=$( basename $0 )
< instance_name=${script_name:6}
<
74c70
< datadir=/var/lib/mysql/${instance_name}
---
> datadir=/var/lib/mysql
282c278
< echo $echo_n "Starting MySQL (Percona Server) [$instance_name from $datadir]"
---
> echo $echo_n "Starting MySQL (Percona Server)"
287c283
< $bindir/mysqld_safe --defaults-file="$datadir/my.cnf" --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null 2>&1 &
---
> $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null 2>&1 &
367,373c363
<
< # test if multiple pids exist
< pid_count=`echo $mysqld_pid | wc -w`
< if test $pid_count -gt 1 ; then
< log_failure_msg "Multiple MySQL running but PID file could not be found ($mysqld_pid)"
< exit 5
< elif test -z $mysqld_pid ; then
---
> if test -z $mysqld_pid ; then
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment