1

I now have a local copy of a live EE site. Front and backend are working with no problems.

However, when I imported the production database I got this one alert:

[ERROR in query 912] 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 '' at line 1

Should I be worried?

These are the first lines in the sql file:

-- phpMyAdmin SQL Dump
-- version 4.0.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 29, 2013 at 07:18 PM
-- Server version: 5.5.29-MariaDB
-- PHP Version: 5.3.17

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

Any idea?

  • Not certain but I think you'd have to find the 912th query in the dump... and look at the first line of that query not the first line of the dump... – AllInOne Oct 31 '13 at 2:03
  • Mmmh... My knowledge of SQL is not good. How do I actually locate that "query 912", once I imported the database? – Sergio Acosta Oct 31 '13 at 11:07
  • Again, not certain, but as queries are delimited by semi-colons perhaps you could search for the 912th semi-colon. – AllInOne Oct 31 '13 at 15:25
  • For testing purposes, if you export the database from your localhost and then re-import that export does it product the same error? If not, I wouldn't worry about it. Plus, I suggest always exporting you db with "DROP tables syntax" added and gzipped. – Stephen Callender Oct 31 '13 at 17:41
  • I followed @stephen-callender advice. I exported the database from my localhost and then re-import it. I didn't get any errors this time. And learning to always exporting my db with "DROP tables syntax" added and gzipped. Thanks Stephen! Having said that... is it resolved? I probably have a data issue remaining there. – Sergio Acosta Nov 1 '13 at 12:48
1

Sometimes these errors happen because of the connection or application used in exporting the db. I'd recommend using Sequel Pro to export the db with DROP tables syntax and gzipped. If you still see the alert/error, then there's really something wrong.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.