Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Database Connection Failure

Support
classylady
2007-09-15
2013-04-15
  • classylady
    classylady
    2007-09-15

    When trying to add a Signup Server I click the "Add Signup Server" button and then I get an error that reads:

    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 'xxx@ IDENTIFIED BY "xxx's password" WITH GRANT OPTION' at line 1

    when looking in the httpd-error.log file it reads:

    DBD::mysql::st execute 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 'xxx@xxx.xxx.xxx.xxx IDENTIFIED BY "xxx's password" WITH GRANT OPTION' at line 1 at
    /usr/local/lib/perl5/5.8.8/BSDPAN/Mysql.pm line 175.

    This is the code that is on line 175 in the Mysql.pm file:

        my $result = $sth->execute();

    using FreeBSD 6.2, Mysql 5.0.27, apache+mod_ssl-1.3.37+2.8.28, perl 5.8.8 with version 2.05 of Gnu Hosting Helper.... please can you help me figure this out..

    thank you..

     
    • I've not seen any issues with mysql 5 except the database creation tool.  What name did you choose for your database?

      The line in question is in signup.pl in the admin/mod directory:

      $statement=qq(GRANT ALL ON $system{'dbname'}.* TO $system{'dbuser'}\@$FORM{'ip'} IDENTIFIED BY "$system{'dbpass'}" WITH GRANT OPTION);

      This version doesn't have backticks `  around the db name.  If you chose a db name with a reserved character in it (ie: -) that may be the issue.  If you alter the line to read:

      $statement=qq(GRANT ALL ON `$system{'dbname'}`.* TO `$system{'dbuser'}`\@'$FORM{'ip'}' IDENTIFIED BY "$system{'dbpass'}" WITH GRANT OPTION);

      It may solve your problem.

      Redragon

       
    • classylady
      classylady
      2007-09-16

      Thanks Redragon...

      That seemed to work ok...