Error in Query

March 21, 2010 - 6:26 pm
  • I'm trying to restore my database but I meet with this error:


    Error in Query:

    /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;MySQL says:

    Variable 'foreign_key_checks' can't be set to the value of 'NULL'


    Can I insert which values to variable "foreign_key_checks" ???

    Thanks!


  • You get this error because the backup was created on a higher MySQL version. The backups are (with default options) not downwards compatible.

    You could try using MySQLDumper (http://www.mysqldumper.de/en/index.php)some people have good experiences using it to restore between versions.

    Another option would be to restore on a system with MySQL version 4.1, and then exporting with the compatible flag.
    I have just re-restore it again on other server (using mySQL version 4.1.x) but now I have this error:



    Warning: array_keys(): The first argument should be an array in /includes/functions.php on line 3230

    Warning: Invalid argument supplied for foreach() in /includes/functions.php on line 3230



    Link: http://70.85.138.178/~vimaruo/forum/

    Have you any sucgestion?


  • Try opening the backup file and removing that line.


  • You get this error because the backup was created on a higher MySQL version. The backups are (with default options) not downwards compatible.

    You could try using MySQLDumper (http://www.mysqldumper.de/en/index.php)some people have good experiences using it to restore between versions.

    Another option would be to restore on a system with MySQL version 4.1, and then exporting with the compatible flag.


  • A software like UltraEdit should be able to open it.

    The other option is to downgrade your new mysql servers version to the version you were using before.Actually i expect the new server to be on an older version, so upgrading would be more logical.

    @farmervmr
    You can find the MySQL version on the AdminCP homepage (if you can access that).


  • And the version on the new server?


  • Not exactly :)
    I assume this is because a difference in the versions of mysql.

    Do you still have access to your old server?
    No, all of my database on old server was removed by the Administrator. Have anyways for me to fix my database?


  • mysql

    MySQL SupportenabledActive Persistent Links 0 Active Links 0 Client API version 4.0.25 MYSQL_MODULE_TYPE external MYSQL_SOCKET /var/lib/mysql/mysql.sock MYSQL_INCLUDE -I/usr/include/mysql MYSQL_LIBS -L/usr/lib -lmysqlclient


    is this?
    plz check it for me.

    Thanks!


  • How did you create your backup?
    What was the MySQL version on old & new server?


  • Run the Usergroup / Forum Cache setting.
    Thank you!
    Now it work very well :)


  • Not exactly :)
    I assume this is because a difference in the versions of mysql.

    Do you still have access to your old server?


  • How did you create your backup?
    What was the MySQL version on old & new server?
    I backup my database via backup function (full) in cPanel.
    I'm not sure the mySQL version of old server because all of my database on it has been moved.

    Can you help me?

    Thanks!


  • A software like UltraEdit should be able to open it.

    The other option is to downgrade your new mysql servers version to the version you were using before.


  • @farmervmr
    You can find the MySQL version on the AdminCP homepage (if you can access that).
    My MySQL version is 4.0.25 standard but I don't have permission to server because I'm hosting in this server therefore I can't up/downgrade the MySQL version.

    Can I edit in the database to fix this problem?
    Thanks!


  • Upload the tools.php file from your do_not_upload folder to your AdminCP.
    Log in and run through the top few options. I have ran:


    [Style] This will take the latest style from ./install/vbulletin-style.xmlVersion: 3.5.3

    [Settings] This will take the latest settings from ./install/vbulletin-settings.xmlVersion: 3.5.3

    [Language] This will take the latest language from ./install/vbulletin-language.xmlVersion: 3.5.3

    But my forum still doesn't work! :(


  • Try opening the backup file and removing that line.
    The file backup is over 100mb, I can not open it with any text editor then how to delete that line?


  • Reupload all the default vBulletin non-image files in ASCII mode, overwriting your current files. Also, turn off plugins globally in your vBulletin Options. Does this problem still occur then?


  • Warning: Division by zero in /includes/functions.php(4320) : eval()'d code on line 163


  • i get that after doing all those


  • Upload the tools.php file from your do_not_upload folder to your AdminCP.
    Log in and run through the top few options.


  • Run the Usergroup / Forum Cache setting.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Error in Query , Please add it free.