Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-09-26
3
Medium Priority
?
1,046 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

671 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