$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"
$ mysql -V
mysql Ver 15.1 Distrib 10.2.6-MariaDB, for debian-linux-gnu (x86_64) using
readline 5.2
Explanation and workaround:
/usr/share/dbconfig-common/data/cacti/install/mysql includes:
CREATE TABLE rra (
...
rows INT(12) NOT NULL DEFAULT '600',
...
) ENGINE=MYISAM;
ROWS is a reserved word in MariaDB 10.2.4 upwards, according to
https://mariadb.com/kb/en/mariadb/reserved-words/
If you change rows to `rows` (backticks required), the CREATE TABLE rra
query succeeds, but the file
/usr/share/dbconfig-common/data/cacti/install/mysql
does not seem to exist until some time during the execution of dbconfig-
common, so it seems its first attempt must fail.
At this point I had to killall php every few mins to prevent memory,
swap and CPU usage approaching 100% (since php restarts after a while).
MariaDB [(none)]> drop database cacti;
Query OK, 37 rows affected (0.03 sec)
Edit the now-existing /usr/share/dbconfig-common/data/cacti/install/mysql to
change ROWS to `rows` in CREATE TABLE rra
Retry in dbconfig-common
Installation succeeds.
As an aside, SQLyog 12.4.2 x64 running under WINE 1.6.2 didn't actually
drop the cacti database despite apparent success, as retrying in
dbconfig-common then produced
ERROR 1050 (42S01) at line 7: Table 'cdef' already exists
so had to use terminal client.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1699665
Title:
Database config fails due to SQL error
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cacti/+bug/1699665/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs