SQL error... I've Never Seen This Before...

Discussion in 'MySQL' started by fordsho, Jan 24, 2008.

  1. #1
    Error

    SQL query:

    -- phpMyAdmin SQL Dump
    -- version 2.11.0
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Dec 05, 2007 at 11:38 PM
    -- Server version: 4.1.22
    -- PHP Version: 5.2.3
    SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";

    MySQL said: Documentation
    #1193 - Unknown system variable 'SQL_MODE'


    #1193? What is that?!
     
    fordsho, Jan 24, 2008 IP
  2. Chuckun

    Chuckun Well-Known Member

    Messages:
    1,161
    Likes Received:
    60
    Best Answers:
    2
    Trophy Points:
    150
    #2
    Chuckun, Jan 24, 2008 IP
  3. wootty

    wootty Peon

    Messages:
    447
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi - 1193 is just a 'general' type error because it doesn't recognise the variable (SQL_MODE) that you're trying to set.

    I think in this case it relates to issues such as exporting from one version of MySQL and importing into another version - and there are sometimes compatibility issues between the two versions.

    From similar posts I've seen, you could try just commenting out that 'SET' line, but you will then probably find other problems in the SQL - in the create table statements (and possibly in the values of auto_increment columns, according to the MySQL doco).

    Can you check what version of MySQL was used to do the export, and what version of MySQL you are trying to import into? For example, you could come across this type of error if you exported from a MYSQL 5 database and are trying to import into a MYSQL 4 database - in which case there are options you can set when you do the export to make sure that the script is going to be compatible with a MYSQL 4 DB.

    Just a possible cause...I'm not definite about this...

    cheers
    wootty
     
    wootty, Jan 24, 2008 IP