发牌SO 发表于 2018-10-2 12:32:41

MySQL启动时必需到usr/local/mysql目录的问题解决方法

# If you install MySQL on some other places than /usr/local/mysql, then you  # have to do one of the following things for this script to work:
  #
  # - Run this script from within the MySQL installation directory
  # - Create a /etc/my.cnf file with the following information:
  #   
  #   basedir=
  # - Add the above to any other configuration file (for example ~/.my.ini)
  #   and copy my_print_defaults to /usr/bin
  # - Add the path to the mysql-installation-directory to the basedir variable
  #   below.
  #
  # If you want to affect other MySQL variables, you should make your changes
  # in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files.
  # If you change base dir, you must also change datadir. These may get
  # overwritten by settings in the MySQL configuration files.
  basedir=
  datadir=
  # The following variables are only set for letting mysql.server find things.
  # Set some defaults
  mysqld_pid_file_path=
  if test -z "$basedir"
  then
  basedir=/usr/local/mysql
  bindir=/usr/local/mysql/bin
  if test -z "$datadir"
  then
  datadir=/usr/local/mysql/data
  fi
  sbindir=/usr/local/mysql/bin
  libexecdir=/usr/local/mysql/bin
  else
  bindir="$basedir/bin"
  if test -z "$datadir"
  then
  datadir="$basedir/data"
  fi
  sbindir="$basedir/sbin"
  libexecdir="$basedir/libexec"
  fi

页: [1]
查看完整版本: MySQL启动时必需到usr/local/mysql目录的问题解决方法