Commit 22f620f2 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Fixed mysql config directory location and generation of initial database

parent 7417bdd1
......@@ -29,7 +29,7 @@ all: my-cnf mariadb-config
tar xf mariadb-10.3.13.tar.gz
cd mariadb-10.3.13 && sed -i "s@data/test@\$${INSTALL_MYSQLTESTDIR}@g" sql/CMakeLists.txt
mkdir mariadb-10.3.13/build
cd mariadb-10.3.13/build && cmake -DCMAKE_BUILD_TYPE=Release -DINSTALL_LAYOUT=DEB -DWITH_EXTRA_CHARSETS=complex -DSKIP_TESTS=ON -DTOKUDB_OK=0 -DWITH_WSREP=ON -DWITH_INNODB_DISALLOW_WRITES=ON ..
cd mariadb-10.3.13/build && cmake -DCMAKE_BUILD_TYPE=Release -DINSTALL_LAYOUT=DEB -DINSTALL_SYSCONF2DIR=/etc/my.cnf.d -DWITH_EXTRA_CHARSETS=complex -DSKIP_TESTS=ON -DTOKUDB_OK=0 -DWITH_WSREP=ON -DWITH_INNODB_DISALLOW_WRITES=ON ..
$(MAKE) -C mariadb-10.3.13/build
$(MAKE) -C mariadb-10.3.13/build test
$(MAKE) -C mariadb-10.3.13/build install
......@@ -47,7 +47,7 @@ all: my-cnf mariadb-config
install -v -Dm644 mysqlchk.socket /lib/systemd/system/mysqlchk.socket
install -v -Dm644 mysqlchk@.service /lib/systemd/system/mysqlchk@.service
systemctl enable mysqlchk.socket
mysql_install_db --basedir=/usr --user=mysql --skip-test-db
mysql_install_db --basedir=/usr --user=mysql --skip-test-db --innodb-log-file-size=32M
sed -e '/^UserParameter=device\.product.*/a UserParameter=mysql.version,mysql -V' -i /etc/zabbix_agentd.conf
sed -e '/^UserParameter=device\.product.*/a UserParameter=mysql.ping,mysqladmin -u root ping | grep -c alive' -i /etc/zabbix_agentd.conf
sed -e '/^UserParameter=device\.product.*/a UserParameter=mysql.size[*],bash -c '\''echo "select sum($$(case "$$3" in both|"") echo "data_length+index_length";; data|index) echo "$$3_length";; free) echo "data_free";; esac)) from information_schema.tables$$([[ "$$1" = "all" || ! "$$1" ]] || echo " where table_schema=\\"$$1\\"")$$([[ "$$2" = "all" || ! "$$2" ]] || echo "and table_name=\\"$$2\\"");" | mysql -u root -N'\''' -i /etc/zabbix_agentd.conf
......
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