Ad Widget

Collapse

1.8 Upgrade - Database Patch Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • laakness
    Junior Member
    • Oct 2009
    • 20

    #1

    1.8 Upgrade - Database Patch Error

    I was able to successfully upgrade my test Zabbix 1.6.7 system to 1.8.

    I tried the same procedure on my production system and got a failure when running the database patch. Here is the error.

    ERROR 1064 (42000) at line 49: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6
    Failed to patch Zabbix database. Restore from backup
    I have found it to be this table creation line:

    CREATE TABLE expressions (
    expressionid bigint unsigned DEFAULT '0' NOT NULL,
    regexpid bigint unsigned DEFAULT '0' NOT NULL,
    expression varchar(255) DEFAULT '' NOT NULL,
    expression_type integer DEFAULT '0' NOT NULL,
    exp_delimiter varchar(1) DEFAULT '' NOT NULL,
    case_sensitive integer DEFAULT '0' NOT NULL,
    PRIMARY KEY (expressionid)
    ) type=InnoDB;
    I am running MySQL 5.0.67 on OpenSuse 11.1. For now I've had to restore my database and recompile the 1.6.7 version to get production back and working. I'm not quite sure why the same procedure worked in test but not production. Both boxes run the same version of mysql and linux.
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    Zabbix 3.0 Network Monitoring book

    Comment

    • laakness
      Junior Member
      • Oct 2009
      • 20

      #3
      Thanks richlv, that fixed it.
      Last edited by laakness; 11-12-2009, 21:42.

      Comment

      • dotelpenguin
        Junior Member
        • Feb 2009
        • 14

        #4
        I also am having the same problem. 1.6.6 to 1.8. Mysql 5.0.84, gentoo.

        I tried updating the patch files according to the link in the bug report. I got past the first error, but then it stops at line 66. Also adjusted the "color" line. but still errors out after restoring DB and trying again. My SQLfu is on the weak side. Would you mind explaining why this is a problem, and what changed to fix it. From then on I might understand it enough to plod my way through the SQL.


        Thanks
        Last edited by dotelpenguin; 12-12-2009, 00:18.

        Comment

        • laakness
          Junior Member
          • Oct 2009
          • 20

          #5
          What I did was the original fix for the table as posted. I had problems on the other users fix though for the graphs_items table.

          I did this instead.

          alter table `graphs_items` change color color varchar(6) DEFAULT '009600' NOT NULL;
          I just added back ticks to the graphs_items table.

          Comment

          • dotelpenguin
            Junior Member
            • Feb 2009
            • 14

            #6
            That did the Trick. Thanks

            Comment

            Working...