Important Note for MySQL 5.x Users & Cacti 0.8.6h

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Important Note for MySQL 5.x Users & Cacti 0.8.6h

Post by BSOD2600 »

There is a bug in how MySQL 5 is implemented in Cacti 0.8.6h. You must not have the sql-mode variable set. This can be accomplished by commenting out sql-mode in my.ini or starting the MySQL service with --sql-mode="".

When the sql-mode is NOT set, you will get an error when importing the cacti.sql file on a clean install: ERROR 1264 (22003) at line 1857: Out of range value adjusted for column 'availability' at row 1. If the sql-mode is set to TRADITIONAL, you will get the error when importing cacti.sql: ERROR 1067 (42000) at line 1826: Invalid default value for 'status_fail_date'

If you ignore the error and try to continue to install cacti, you will notice the install page does not come up. On Windows, you will receive and error simular to: PHP has encountered an Access Violation at 01DA82DF. Other errors you might notice is items not being properly polled, missing from the poller cache, etc.
User avatar
zrichardson
Posts: 24
Joined: Wed Jan 04, 2006 3:15 pm
Location: OR, USA

Post by zrichardson »

You can get more detailed info in this thread if you're interested: http://forums.cacti.net/viewtopic.php?t=11229
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Important Note for MySQL 5.x Users & Cacti 0.8.6h

Post by Howie »

Weirdly, I've just hit this for the first time, 10 years later on 0.8.8h :-)

The solution isn't clear though - if you don't set the variable you get an error, but if you do set it, you get a different error??

MySQL Server version: 5.7.12-0ubuntu1 (Ubuntu)
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
VinxItak
Posts: 8
Joined: Wed May 29, 2013 7:09 am

Re: Important Note for MySQL 5.x Users & Cacti 0.8.6h

Post by VinxItak »

Hi,

I have the same error on cacti 0.8.8h.
mysql 5.7.12 on sles12 sp1 up to date

edit : ok solution found : http://forums.cacti.net/viewtopic.php?p=261740#p261740

SET GLOBAL sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';


after drop and create, the sql import return no error
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests