Web Hostig System auch mit MariaDB 10

User avatar
Proteus
Posts: 256
Joined: 2013-04-14 05:08
Location: Holzgerlingen

Web Hostig System auch mit MariaDB 10

Post by Proteus »

Wollte nur mal angemerkt haben, das sich deine HowTo auch mit MariaDB 5.5 oder 10 einrichten lässt.

cd /usr/ports/databases/mariadb100-server/&& make config && make install clean && cd

cat > /var/db/mysql/my.cnf << "EOF"
[client]
port = 3306
socket = /tmp/mysql.sock

[mysql]
prompt = \u@\h [\d]>\_
no_auto_rehash

[mysqld]
user = mysql
port = 3306
bind-address = 127.0.0.1
socket = /tmp/mysql.sock
basedir = /usr/local
datadir = /var/db/mysql
tmpdir = /data/tmp/mysql
slave-load-tmpdir = /data/tmp/mysql
secure-file-priv = /data/tmp/mysql
log-bin = /var/db/mysql/mysql-bin
relay-log = /var/db/mysql/relay.log
relay-log-index = /var/db/mysql/relay.index
relay-log-info-file = /var/db/mysql/relay.info
master-info-file = /var/db/mysql/master.info
server-id = 1
back_log = 500
sync_binlog = 1
binlog_cache_size = 4M
binlog_stmt_cache_size = 4M
max_binlog_size = 500M
binlog-format = MIXED
expire_logs_days = 30
slow-query-log = 1
slow-query-log-file = /var/db/mysql/slow-query.log
performance_schema = 1
slave_compressed_protocol = 1
lower_case_table_names = 0
safe-user-create = 1
delay-key-write = ALL
sql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
myisam-recover-options = FORCE,BACKUP
key_buffer_size = 256M
join_buffer_size = 128K
sort_buffer_size = 2M
read_buffer_size = 128K
read_rnd_buffer_size = 256K
bulk_insert_buffer_size = 8M
myisam_sort_buffer_size = 8M
max_allowed_packet = 64M
max_heap_table_size = 64M
tmp_table_size = 64M
thread_stack = 192K
table_open_cache = 8192
table_definition_cache = 8192
open_files_limit = 32768
net_retry_count = 16384
query_cache_type = 1
query_cache_size = 64M
query_cache_limit = 2M
query_cache_min_res_unit = 4K
thread_cache_size = 80
max_connections = 100
ft_max_word_len = 20
ft_min_word_len = 3
long_query_time = 0.5
local-infile = 0
log-warnings = 2
log-slave-updates
log-queries-not-using-indexes
skip-external-locking
skip-symbolic-links
default_storage_engine = InnoDB
innodb_thread_concurrency = 8
innodb_buffer_pool_size = 4G
innodb_buffer_pool_instances = 4
innodb_data_home_dir = /var/db/mysql
innodb_log_group_home_dir = /var/db/mysql
innodb_data_file_path = ibdata1:2000M;ibdata2:2000M;ibdata3:10M:autoextend
innodb_flush_method = O_DIRECT
innodb_log_file_size = 256M
innodb_log_buffer_size = 16M
innodb_log_files_in_group = 2
innodb_flush_log_at_trx_commit = 2
innodb_max_dirty_pages_pct = 90
innodb_file_per_table = 1
innodb_purge_threads = 1
innodb_strict_mode = 1
innodb_old_blocks_time = 1000
innodb_stats_on_metadata = 0
innodb_write_io_threads = 8
innodb_read_io_threads = 8
innodb_io_capacity = 200
innodb_open_files = 8192
innodb_optimize_fulltext_only = 1

[mysqldump]
max_allowed_packet = 256M
key_buffer_size = 256M
quote_names
quick

[isamchk]
key_buffer_size = 256M

[myisamchk]
key_buffer_size = 256M

[mysqlhotcopy]
interactive_timeout
"EOF"

chmod 0660 /var/db/mysql/my.cnf
chown mysql:mysql /var/db/mysql/my.cnf

mkdir -p /data/tmp/mysql

chmod 1770 /data/tmp/mysql
chown mysql:mysql /data/tmp/mysql

-----

Die mysql_install_db_args erweitern und eventuell austauschen.

vim /usr/local/etc/rc.d/mysql-server

mysql_install_db_args="--basedir=/usr/local --defaults-extra-file=${mysql_optfile} --datadir=${mysql_dbdir} --user=${mysql_user} --force"

-----

/usr/local/etc/rc.d/mysql-server start

tail -f /var/db/mysql/srv.blabla-server.err

mysql_secure_installation

/usr/local/etc/rc.d/mysql-server restart

mysqlcheck -u root -p --all-databases --check
LG
Proti

https://phoenix-blog.de

"Die Kamera wird bei hohen ISO Werten aber rauschen. Nichts ahnend hielt er sich die Kamera ans Ohr!"
Top