Troy Knapp
Troy Knapp

Reputation: 523

phpmyadmin import/export problem

I have two servers, both running phpmyadmin, and I exported a mysql dump on one using the export tab on phpmyadmin, and I tried importing the query with phpmyadmin on the second site.

I get 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 ' SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"' at line 1

I've looked through the text file and there is absolutely no "" in there. I've deleted all the comments at the top just to make sure it isn't some weird kind of interpretation error.

If anyone has any ideas to make phpmyadmin actually import this, I'm all ears. Unfortunately, this is a cheap shared server, and I don't have a whole lot of tools at my disposal. I have FTP access, and phpmyadmin access, but not much else. I usually do this via SSH, unfortunately, they don't trust me with that kind of access.

Upvotes: 1

Views: 2481

Answers (1)

Pekka
Pekka

Reputation: 449425

The  is indicative of a BOM. I don't know how it got there - mysqldump shouldn't do this. Maybe the file was opened and saved in an editor that added it.

There are various ways of removing a BOM, see e.g. here. Alternatively, re-dump the data.

Upvotes: 3

Related Questions