Icinga / icingadb

Icinga configuration and state database supporting multiple environments
https://icinga.com
GNU General Public License v2.0
60 stars 21 forks source link

MySQL schema import fails on CentOS 7 #69

Closed dnsmichi closed 4 years ago

dnsmichi commented 5 years ago

Steps to reproduce

Fresh CentOS 7 Vagrant box. Snapshot repository enabled like documented in icinga2: https://icinga.com/docs/icinga2/latest/doc/21-development/#snapshot-packages-nightly-builds

yum -y install https://packages.icinga.com/epel/icinga-rpm-release-7-latest.noarch.rpm
yum -y install epel-release
yum makecache

yum install --enablerepo=icinga-snapshot-builds icingadb

Going further with the docs draft PR: https://github.com/Icinga/icingadb/pull/3/files

MariaDB install.

yum install mariadb-server mariadb
systemctl enable mariadb
systemctl start mariadb
mysql_secure_installation
# mysql -u root -p
CREATE DATABASE icingadb;
GRANT ALL ON icingadb.* TO 'icingadb'@'127.0.0.1' IDENTIFIED BY 'icingadb';
quit

Schema import.

cat /usr/share/icingadb/schema/mysql/mysql.schema.sql | mysql -p -uroot icingadb
Enter password:
ERROR 1005 (HY000) at line 6: Can't create table 'icingadb.host' (errno: 1478)

Likely related to ROW_FORMAT=dynamic.

More details

Al2Klimov commented 4 years ago

Same in #86.

lippserd commented 4 years ago

We should add the following to our docs:

Note that if you're using a version of MySQL < 5.7 or MariaDB < 10.2, the following server options must be set:

innodb_file_format=barracuda    
innodb_file_per_table=1 
innodb_large_prefix=1
N-o-X commented 4 years ago

I've added the note to the installation documentation. This issue will be closed with #3