Click to See Complete Forum and Search --> : Import SQL Error - Unknown system variable 'SQL_MODE'?


ne_plus_ultra
11-06-2007, 06:01 PM
Is anyone familiar with this error when importing a .sql file into phpmyadmin?

Error

SQL query:

-- phpMyAdmin SQL Dump
-- version 2.11.0
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 06, 2007 at 05:55 PM
-- Server version: 5.0.45
-- PHP Version: 5.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"

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


The file was created from my localhost myphpadmin -- and I am now attempting to upload into my site hosts' secure sql database.

chazzy
11-07-2007, 06:59 AM
what version of mysql are you running locally and what is your host running? it could be that you're using a newer version (5+) but the host is running something old (maybe 4 or 4.1).

joshi.mangesh
12-10-2007, 08:10 AM
Yes..I am devloping Application in PHP 5 and Mysql 5 ..but deploying it on elarlier versions ..i.e. mysql 4.1 .
I got the same error "#1193 - Unknown system variable 'SQL_MODE' "

while importing database...

How can we move data from mysql 5.2 to Mysql 4.1 ?

Thanks in Advance.

chazzy
12-10-2007, 07:42 PM
you just need to remove that line from the export... and switch your development environment to the same as your production environment, so that you don't accidentally use features of mysql 5 in a 4.1 environment where they won't work.