2
votes

I have downloaded the remote contents of a client's website, and I am trying to get them running on my local server. I created and exported the database using phpmyadmin on GoDaddy and tried to import it using phpmyadmin on my localhost (running a fresh LAMP setup on Ubuntu 14.0.4), but got the following message:

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 'PK' at line 1

Here is the export:


    -- phpMyAdmin SQL Dump
    -- version 2.11.11.3
    -- http://www.phpmyadmin.net
    --
    -- Host: XX.XXX.XXX.XX
    -- Generation Time: Apr 16, 2015 at 02:38 PM
    -- Server version: 5.5.40
    -- PHP Version: 5.1.6
    
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    
    
    /*!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: `XXXXXXXXXX`
    --
    CREATE DATABASE `XXXXXXXXXX` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

USE `XXXXXXXXXX`;

Looking at other people's #1064 error problems did not really enlighten me much, as my error message references the syntax near "PK" at line 1, and "PK" is nowhere in the file. Any insight would be helpful. This is the first time I've tried moving a website from remote server (would also like to be able to move them in the other direction as well)

1
Does this help? This seem to be identical to your issue : wordpress.org/support/topic/… - Patrick
Following up - are you trying to import a zipped sql file? they report it might be an issue - Patrick
Awesome! This seems to have worked! - Kevin Hopper

1 Answers

1
votes

It won't allow you to upload the files all zipped together in one big file (maybe separately). You'll need to unzip the files, then upload them.