Solved

can't import .sql file into mysql (wrong syntax)

Posted on 2011-09-26
3
1,023 Views
Last Modified: 2012-05-12
I'm sending an exported MySQL sql file to a colleague of mine so he can work on the same database structure. Unfortunately, he keeps getting this error:

#1064 - 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 'TYPE=MyISAM  AUTO_INCREMENT=3' at line 15


I'm sure it has something to do with the encoding, but don't know what to change.

Some more info about my colleague's Mysql version:

Server: Localhost via UNIX socket
Server version: 5.5.9
Protocol version: 10
User: root@localhost
MySQL charset: UTF-8 Unicode (utf8)
Web server

Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
MySQL client version: 5.5.9
PHP extension: mysql



Attached you'll find the upper part of the .sql export file.
-- phpMyAdmin SQL Dump
-- version 2.10.1
-- http://www.phpmyadmin.net
-- 
-- Host: mysql-006.openminds.be:3306
-- Generated: 25 Sept 2011 at 12:08
-- Server version: 5.1.49
-- PHP version: 5.2.6-3


/*!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 */;

-- 
-- Database: `d1s_cms`
-- 
CREATE DATABASE `d1s_cms` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE d1s_cms;

-- --------------------------------------------------------

-- 
-- Tabel structuur voor tabel `wp_d90_commentmeta`
-- 

CREATE TABLE `wp_d90_commentmeta` (
  `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `comment_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  `meta_key` varchar(255) DEFAULT NULL,
  `meta_value` longtext,
  PRIMARY KEY (`meta_id`),
  KEY `comment_id` (`comment_id`),
  KEY `meta_key` (`meta_key`)
) TYPE=MyISAM  AUTO_INCREMENT=3 ;

Open in new window

0
Comment
Question by:digital1stein
  • 2
3 Comments
 

Author Comment

by:digital1stein
ID: 36598134
FYI: my Mysql version is
mysql  Ver 14.14 Distrib 5.1.49, for Win32 (ia32)
0
 
LVL 3

Accepted Solution

by:
azserrata earned 500 total points
ID: 36598493
Hi!

About the storage engine, try ENGINE=xxxx instead of TYPE=xxxxx.

Cheers
David
0
 

Author Comment

by:digital1stein
ID: 36599267
It worked! Thanks.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now