<p>As Brad replied as a comment, the issue was indeed PhPMyAdmin. Using NaviCat or updating my PhPMyAdmin resolved the issue.</p>

<p>Answer points go to Brad!</p>

CC BY-SA 3.0
2017-02-10T12:59:33.407Z
2017-02-10T12:59:33.407Z
Tom De Smet
<p>I had this issue on two different sites on two different occasions and hosts.
When creating a database back-up through the Craft CMS admin and importing that SQL file into a new database through PhP MyAdmin I get syntax errors and import stops.</p>

<p>I tried backing up the database on both sites through the hosting company itself, which resulted in one backup working and one also giving the syntax error.</p>

<p>I just updated the sites to Craft 2.6.x.</p>

<p>Any ideas what goes wrong or how I can solve this? Do I need to manually go through the whole SQL file and fix the syntax errors manually? :/</p>

<p>When I open the SQL file in PhPStorm, it looks like the character where the error happens, all the SQL statements coming behind it are escaped wrong, they are shown as normal text. Maybe an encoding issue?</p>

CC BY-SA 3.0
2017-02-10T06:48:55.020Z
We've seen this a few times and it always involves phpMyAdmin and it appeared to be version specific (i.e. if they updated their phpMyAdmin version the error went away). So always just assumed it was a phpMyAdmin bug because the same backup imported fine through a "real" database client.
Brad Bell
<database><mysql><back-up>
DB back-up gives syntax errors on import in new DB
# DB back-up gives syntax errors on import in new DB

(Asked by: username_0 on 2017-02-09)

I had this issue on two different sites on two different occasions and hosts.
When creating a database back-up through the Craft CMS admin and importing that SQL file into a new database through PhP MyAdmin I get syntax errors and import stops.

I tried backing up the database on both sites through the hosting company itself, which resulted in one backup working and one also giving the syntax error.

I just updated the sites to Craft 2.6.x.

Any ideas what goes wrong or how I can solve this? Do I need to manually go through the whole SQL file and fix the syntax errors manually? :/

When I open the SQL file in PhPStorm, it looks like the character where the error happens, all the SQL statements coming behind it are escaped wrong, they are shown as normal text. Maybe an encoding issue?

**Tags:** database, mysql, back-up

> **Comments:**
> **username_1**: We've seen this a few times and it always involves phpMyAdmin and it appeared to be version specific (i.e. if they updated their phpMyAdmin version the error went away). So always just assumed it was a phpMyAdmin bug because the same backup imported fine through a "real" database client.  

---

## 1 answers

### Answer by username_0 on 2017-02-10. Score: 1

As Brad replied as a comment, the issue was indeed PhPMyAdmin. Using NaviCat or updating my PhPMyAdmin resolved the issue.

Answer points go to Brad!


---

