Commit 7b745f8d authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

MariaDB configs now reside in /etc/my.cnf.d folder

parent 67eacbd8
all: my-cnf mariadb-config
all: client-cnf mysql-clients-cnf server-cnf mariadb-config
dd if=/dev/zero of=swap bs=1048576 count=1024
chmod 600 swap
mkswap swap
......@@ -34,8 +34,9 @@ all: my-cnf mariadb-config
$(MAKE) -C mariadb-10.3.13/build test
$(MAKE) -C mariadb-10.3.13/build install
rm -rf /usr/mysql-test
install -v -dm 755 /etc/mysql
@echo "$$MY_CNF" > /etc/mysql/my.cnf
@echo "$$CLIENT_CNF" > /etc/my.cnf.d/client.cnf
@echo "$$MYSQL_CLIENTS_CNF" > /etc/my.cnf.d/mysql-clients.cnf
@echo "$$SERVER_CNF" > /etc/my.cnf.d/server.cnf
@echo "$$MARIADB_CONFIG" > /etc/config/mariadb
install -v -Dm755 mariadb /usr/share/easycwmp/functions
install -v -Dm755 wsrep-init /usr/sbin/wsrep-init
......@@ -58,16 +59,44 @@ all: my-cnf mariadb-config
swapoff swap
rm -rf swap
my-cnf:
define MY_CNF
# Begin /etc/mysql/my.cnf
client-cnf:
define CLIENT_CNF
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /run/mysqld/mysqld.sock
endef
export CLIENT_CNF
mysql-clients-cnf:
define MYSQL_CLIENTS_CNF
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
endef
export MYSQL_CLIENTS_CNF
server-cnf:
define SERVER_CNF
# The MySQL server
[mysqld]
datadir = /var/lib/mysql
......@@ -105,32 +134,8 @@ innodb_autoinc_lock_mode = 2
innodb_lock_wait_timeout = 50
!include /run/mysqld/wsrep.conf
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
# End /etc/mysql/my.cnf
endef
export MY_CNF
export SERVER_CNF
mariadb-config:
define MARIADB_CONFIG
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment