1

I used this exported DB to move from one HostGator (call it A) account to another (call it B) about a year+ ago. I'm cleaning up a hacked website mess on HostGator account B so I'm restoring this website from my original files (from HostGator A) on my computer to another HostGator (call it C) account.

I vaguely remember having an issue when I tried to import them to HostGator B - and the chat tech and I came to the conclusion that when I was exporting from HostGator A my computer was saving it but also opening it in NotePad and from there I was saving it to the directory I wanted. I seem to recall him saying something about a space or character or something. I uploaded the .sql file and he fixed it and imported it.

I've been on chat tech with HostGator today for going on 3 hours. :-\

Error:

SQL query:

phpMyAdmin SQL Dump
-- version 3.5.5
-- phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 30, 2014 at 12:53 PM
-- Server version: 5.5.33-31.1
-- PHP Version: 5.4.23

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

MySQL said: Documentation
#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 'phpMyAdmin SQL Dump
-- version 3.5.5
-- phpmyadmin.net
--
-- Host: lo' at line 1

Here are the first few lines:

-- phpMyAdmin SQL Dump
-- version 3.5.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 30, 2014 at 12:53 PM
-- Server version: 5.5.33-31.1
-- PHP Version: 5.4.23

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

--
-- Database: <code>hosting_NameChangedForThisPost</code>
--

--

2 Answers 2

3

Your query is missing the comment delimiter -- on the first line. This is why it's telling you there's an error "near 'phpMyAdmin SQL Dump". Make sure when you're copying and pasting that you're not missing the first couple of characters.

Sign up to request clarification or add additional context in comments.

4 Comments

Ok, so the bottom 'block quote' in my post is from the actual database file, so you are saying I have to ad two additional -- ? Because I am seeing this: '-- phpMyAdmin SQL Dump -- version 3.5.5 -- phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 30, 2014 at 12:53 PM -- Server version: 5.5.33-31.1 -- PHP Version: 5.4.23' So it should be this? '-- -- phpMyAdmin SQL Dump -- version 3.5.5 -- phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 30, 2014 at 12:53 PM -- Server version: 5.5.33-31.1 -- PHP Version: 5.4.23'
How are you providing this file to MySQL?
I didn't copy/paste. I simply exported it from phpMyAdmin and imported into phpmyadmin on another hosting account. :(
Well, try adding extra -- at the beginning; it seems your import process is removing the first comment marker.
2

in this case, Instead of importing teh .sql. Go to your phpmysql and click on SQL. Then open your .sql file you want to import in notepad. copy and paste .

In this way you will avoid the importing process removing the comment delimiter -- on the first line. T

1 Comment

Yes! Only add -- -- to the beginning!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.