Catci 1.2.26 - Import of cacti.sql fails Error"#1064 - You have error in your SQL syntax; ....

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
soniya
Posts: 7
Joined: Sun Feb 18, 2024 1:03 pm

Catci 1.2.26 - Import of cacti.sql fails Error"#1064 - You have error in your SQL syntax; ....

Post by soniya »

Catci 1.2.26 - Import of cacti.sql fails with Error #1064 - You have error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SET SESSION sql_mode = @sqlmode;

--
-- Table structure for table 'aggregate_...' at line 2

can someone help fix this? Any suggestions
error during import of cacti.sql
error during import of cacti.sql
Screenshot 2024-02-18 100644.png (12.81 KiB) Viewed 12895 times
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Catci 1.2.26 - Import of cacti.sql fails Error"#1064 - You have error in your SQL syntax; ....

Post by macan »

It is working without any issue:
root@localhost [(none)]> create database xxtest;
Query OK, 1 row affected (0.008 sec)

root@localhost [(none)]> exit
Bye

[root@kaktus /usr/local/share/cacti_develop]# mysql -uroot -p xxtest < cacti.sql
Enter password:

What database and version you have?
Let the Cacti grow!
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Catci 1.2.26 - Import of cacti.sql fails Error"#1064 - You have error in your SQL syntax; ....

Post by Osiris »

What version of MariaDB/MySQL are you using. My guess is MySQL 8.x. if so, delete all those lines at the top, and report the details to Cacti GitHub issue list.
Before history, there was a paradise, now dust.
soniya
Posts: 7
Joined: Sun Feb 18, 2024 1:03 pm

Re: Catci 1.2.26 - Import of cacti.sql fails Error"#1064 - You have error in your SQL syntax; ....

Post by soniya »

Im using XAMPP version 8.2.12
It is running MariaDB 10.4.32


C:\xampp\mysql\bin>mysql -V
mysql Ver 15.1 Distrib 10.4.32-MariaDB, for Win64 (AMD64), source revision c4143f909528e3fab0677a28631d10389354c491
C:\xampp\mysql\bin>

Database client version: libmysql - mysqlnd 8.2.12

Which lines need to be deleted and from which file ? Im not an MYSQL expert and need help with specific to get this working.
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Catci 1.2.26 - Import of cacti.sql fails Error"#1064 - You have error in your SQL syntax; ....

Post by macan »

Remove
DELIMITER //

SET @sqlmode= "";
SET SESSION sql_mode = @sqlmode;
Let the Cacti grow!
soniya
Posts: 7
Joined: Sun Feb 18, 2024 1:03 pm

Re: Catci 1.2.26 - Import of cacti.sql fails Error"#1064 - You have error in your SQL syntax; ....

Post by soniya »

xampp/mysql/data/my.ini --> in this file , i cannot find which/where delimiter to be remove .

this is the current mode configured for mysql :

sql_mode=NO_ZERO_IN_DATE,NO_ZERO_DATE,NO_ENGINE_SUBSTITUTION
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Catci 1.2.26 - Import of cacti.sql fails Error"#1064 - You have error in your SQL syntax; ....

Post by macan »

from cacti.sql
Let the Cacti grow!
soniya
Posts: 7
Joined: Sun Feb 18, 2024 1:03 pm

Re: Catci 1.2.26 - Import of cacti.sql fails Error"#1064 - You have error in your SQL syntax; ....

Post by soniya »

This worked ! Thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests