Menu

You have an error in your SQL syntax;

Justas
2018-10-30
2018-11-20
  • Justas

    Justas - 2018-10-30

    Create new NagiosQL database
    Inserting initial data to settings database has failed: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 'path' AND name='base_path'' at line 1

    Database server connection (privileged user) passed (mysqli)
    Database server version 5.7.23
    Database server support supported
    Creating new database done (nagiosql)
    Installing NagiosQL database tables done
    Create NagiosQL database user done
    Set initial NagiosQL Administrator done
    Database server connection (NagiosQL user) passed

    Deploy NagiosQL settings
    Writing global settings to database failed

    I'm running WAMP and also tried it with MariaDB - same error.

     
  • Martin

    Martin - 2018-10-31

    What version of NagiosQL do you use?

     
  • Justas

    Justas - 2018-10-31

    Hello Martin,

    I'm installing a fresh new nagiosql-3.4.0

     
  • Martin

    Martin - 2018-10-31

    Where and when did you download this version? The error message does not correspond exactly to the current wording. Can you download from here again?

    You can also compare the file /install/functions/initial_settings.php with the GitLab file:
    https://gitlab.com/wizonet/nagiosql/blob/3.4.0/install/functions/initial_settings.php

    Unfortunately, the error cannot be reproduced.

     
  • Justas

    Justas - 2018-10-31

    It was the newest version. I've again downloaded the newest version from here again and I'm still getting the same error during installation: https://sourceforge.net/projects/nagiosql/files/nagiosql/NagiosQL%203.4.0/

    I compared both files and they are identical.

     

    Last edit: Justas 2018-10-31
  • Martin

    Martin - 2018-11-01

    Please show the MySQL general query log entries while the error occurs. It must contain the complete and unchanged SQL statement that caused the error.

     
  • Justas

    Justas - 2018-11-04

    Hello Martin,

    Thank you for your help, please find log attached.

     
  • Martin

    Martin - 2018-11-07

    No statement in the logfile produce an error on the test systems. There is also no obvious or visible error in the statements. Above all, there are several identical statements that seem to work without errors.

    What you can still try is to add a line between lines 811 and 812 in this file:
    https://gitlab.com/wizonet/nagiosql/blob/3.4.0/install/functions/NagInstallClass.php

    if ($booReturn == false) {
        echo "$strSQL <br>";
        $strStatusMessage = '<span class="red">' .$this->translate('failed'). '</span>';
    

    This "echo" line will print out any SQl statement that produces an error.

    After that - try to manually insert this statement directly to your database table tbl_settings and find out what to change, that it will work.

     
  • Justas

    Justas - 2018-11-20

    Hello Martin,

    Unfortunately was not able to get it up and running with WAMP on Windows, but no issues and NagiosQL installed correctly when I installed it on CentOS.

    You can close this issue. Thank you for your help.

     
  • Martin

    Martin - 2018-11-20

    Ah - WAMP - ok, we never test NagiosQL on Windows - so it could be possible that this does not work correctly.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.