Hello.
How to specify a separate disk for the database in mysql56-server-5.6.36 ?
in /etc/make.conf
How do I set the mysql to use a separate disk for the database?
As you can see --datadir= default.
Please tell me how to be, tried everything does not work as to specify --datadir= .
How to specify a separate disk for the database in mysql56-server-5.6.36 ?
in /etc/make.conf
Code:
PORTSDIR?=/usr/ports
.if ${.CURDIR} == ${PORTSDIR}/databases/mysql56-server
MY_DBDIR=/var/db/base_mysql/mysql
MY_SECDIR=/var/db/base_mysql/mysql_secure
MY_TMPDIR=/var/db/base_mysql/mysql_tmpdir
.endif
Code:
# cat /usr/local/etc/mysql/my.cnf
[client]
port=3306
socket=/tmp/mysql.sock
default-character-set = utf8
#
[mysqld]
datadir=/var/db/base_mysql/mysql
tmpdir=/tmp
bind-address=3.5.4.3
port=3306
socket=/tmp/mysql.sock
skip-external-locking
default-storage-engine = innodb
max_connections = 42
key_buffer_size = 70M
max_allowed_packet = 180M
table_open_cache = 3770
sort_buffer_size = 10M
read_buffer_size = 10M
join_buffer_size = 10M
read_rnd_buffer_size = 12M
max_heap_table_size=82M
tmp_table_size=82M
table_definition_cache = 3770
myisam_sort_buffer_size = 80M
query_cache_size= 850M
query_cache_type = 1
query_cache_limit= 105M
query_cache_min_res_unit= 1
thread_cache_size = 55
thread_concurrency = 16
#max_join_size = 80000000
#max_sort_length=624
innodb_buffer_pool_size = 27G
innodb_buffer_pool_instances = 6
innodb_additional_mem_pool_size = 25M
innodb_write_io_threads = 32
innodb_read_io_threads = 32
innodb_thread_concurrency = 32
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
#skip-networking
#long_query_time=1
#slow_query_log=1
#slow_query_log_file="/var/log/mysql/slow-query.log"
log_error = /var/log/mysql/errors.log
#
[mysqldump]
quick
#
[mysql]
no-auto-rehash
#
[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
#
[mysqlhotcopy]
interactive-timeout
Code:
# ps -ax | grep mysql
25566 - Ss 0:00.02 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/usr/local/etc/mysql/my.cnf --basedir=/usr/local --datadir=/var/db/mysql --pid-file=/var/db/mysql/BA
26510 - S 0:02.23 /usr/local/libexec/mysqld --defaults-extra-file=/usr/local/etc/mysql/my.cnf --basedir=/usr/local --datadir=/var/db/mysql --plugin-dir=/usr/local/lib/mysql/pl
26514 1 S+ 0:00.00 grep mysql
As you can see --datadir= default.
Please tell me how to be, tried everything does not work as to specify --datadir= .
Code:
# uname -rms
FreeBSD 11.0-RELEASE-p10 amd64
Code:
# mysql -V
mysql Ver 14.14 Distrib 5.6.36, for FreeBSD11.0 (amd64) using EditLine wrapper