配置文件
在 Unix/Linux 上构建后,配置文件“/etc/mysql/my.cnf”应编辑为如下所示 -
# Example mysql config file.
# You can copy this to one of:
# /etc/my.cnf to set global options,
# /mysql-data-dir/my.cnf to get server specific options or
# ~/my.cnf for user specific options.
#
# One can use all long options that the program supports.
# Run the program with --help to get a list of available options
# This will be passed to all mysql clients
[client]
#password = my_password
#port = 3306
#socket = /tmp/mysql.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# The MySQL server
[mysqld]
#port = 3306
#socket = /tmp/mysql.sock
temp-pool
# The following three entries caused mysqld 10.0.1-MariaDB (and possibly other
versions) to abort...
# skip-locking
# set-variable = key_buffer = 16M
# set-variable = thread_cache = 4
loose-innodb_data_file_path = ibdata1:1000M
loose-mutex-deadlock-detector
gdb
######### Fix the two following paths
# Where you want to have your database
data = /path/to/data/dir
# Where you have your mysql/MariaDB source + sql/share/english
language = /path/to/src/dir/sql/share/english
[mysqldump]
quick
MariaDB
8
set-variable = max_allowed_packet=16M
[mysql]
no-auto-rehash
[myisamchk]
set-variable = key_buffer = 128M
编辑“data=”和“language=”行以匹配您的环境。
文件修改后,导航到源目录并执行以下命令 -
./scripts/mysql_install_db --srcdir = $PWD --datadir = /path/to/data/dir --
user = $LOGNAME
如果您将 datadir 添加到配置文件,请省略“$PWD”变量。确保在运行 MariaDB 10.0.1 版时使用“$LOGNAME”。