# DevKinsta: Failed to import database dump DK0066 - packet bigger than max\_allowed\_packet

**URL:** https://community.kinsta.com/t/devkinsta-failed-to-import-database-dump-dk0066-packet-bigger-than-max-allowed-packet/3551
**Category:** Questions
**Created:** [June 7, 2024, 2:15am UTC](https://community.kinsta.com/t/devkinsta-failed-to-import-database-dump-dk0066-packet-bigger-than-max-allowed-packet/3551 "2024-06-07T02:15:26Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![leomuniz](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/leomuniz/32/3558_2.png) [@leomuniz](https://community.kinsta.com/u/leomuniz)
#### Post date: [June 7, 2024, 2:15am UTC](https://community.kinsta.com/t/devkinsta-failed-to-import-database-dump-dk0066-packet-bigger-than-max-allowed-packet/3551/1 "2024-06-07T02:15:26Z")

</div>

When cloning a site to my local DevKinsta, I was getting “Can’t create MySQL dump - DK0029” error. So, after finding [this thread](https://community.kinsta.com/t/can-t-create-mysql-dump-dk0029/2037/2), I contacted Kinsta support, they increased the `max_allowed_packet` and the server could create the dump correctly, allowing me to download the site.

But now DevKinsta is not handling the downloaded DB dump with a different error : Failed to import database dump - DK0066. After looking the logs, I couldn’t find a topic with the same error I’m getting: Got a packet bigger than ‘max\_allowed\_packet’ bytes.

I’ve also tried to manually import the database, but it didn’t work either, with the same error message.

So now I’m trying to figure out how to increase the `max_allowed_packet` on my DevKinsta (probably directly on Docker) to import the database and, after researching a lot, I couldn’t figure it out yet.

Any help would be much appreciated.  
Thank you

---

<div class="post-metadata">

### Author: ![merineth](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/merineth/32/3022_2.png) [@merineth](https://community.kinsta.com/u/merineth)
#### Post date: [June 7, 2024, 3:27am UTC](https://community.kinsta.com/t/devkinsta-failed-to-import-database-dump-dk0066-packet-bigger-than-max-allowed-packet/3551/2 "2024-06-07T03:27:20Z")

</div>

Hi @leomuniz Welcome to the Kinsta Community!

I am sorry to hear that you are currently having issues with DevKinsta. It appears this issue is related to the thread linked [here](https://community.kinsta.com/t/dk0066-import-db-dump-error-1-error-at-line-1-unknown-command).

Our developers are actively working on a solution, and we will keep you updated on their progress.

Regards,

---

<div class="post-metadata">

### Author: ![Adrian\_L](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/adrian_l/32/2810_2.png) [@Adrian\_L](https://community.kinsta.com/u/Adrian_L)
#### Post date: [June 7, 2024, 3:44am UTC](https://community.kinsta.com/t/devkinsta-failed-to-import-database-dump-dk0066-packet-bigger-than-max-allowed-packet/3551/3 "2024-06-07T03:44:58Z")

</div>

Hey @leomuniz 👋,

Welcome to the Kinsta Community!

We regret to inform you that the Pull Devkinsta action is currently not working for pulling a new Kinsta site that uses the specific Mysql/MariaDB mysqldump - `MariaDB dump 10.19 Distrib 10.11.8-MariaDB` - version. Our developers have been notified, and you can follow the thread below for updates on this issue: [DK0066: IMPORT\_DB\_DUMP: Error (1): (ERROR at line 1: Unknown command '\-' - #11](https://community.kinsta.com/t/dk0066-import-db-dump-error-1-error-at-line-1-unknown-command/3491/11)

One workaround would be to create a [downloadable backup](https://kinsta.com/changelog/downloadable-backups/) of your site in MyKinsta. The backup will contain both your site’s WordPress files and its database data.

After that, in DevKinsta, you can create an empty site (Custom Site \>\> Empty site) and manually import both the files and the database from the downloadable backup. You can use [WP CLI](https://kinsta.com/docs/devkinsta/wp-cli/) or the built-in [Database manager](https://kinsta.com/docs/devkinsta/devkinsta-database/database-manager/) to import the database (.sql file).

**However, please remember to delete the first line in the SQL file before performing the database import.**  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/4/427828ce9e7f13aa80513230326ee4d981cbe4fa.png)

Finally, you can run a [search and replace using WP CLI](https://developer.wordpress.org/cli/commands/search-replace/) to update the site’s URL from the live site domain to the Devkinsta domain assigned to it.

I hope you find this information helpful.

---

<div class="post-metadata">

### Author: ![Adrian\_L](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/adrian_l/32/2810_2.png) [@Adrian\_L](https://community.kinsta.com/u/Adrian_L)
#### Post date: [June 7, 2024, 4:28am UTC](https://community.kinsta.com/t/devkinsta-failed-to-import-database-dump-dk0066-packet-bigger-than-max-allowed-packet/3551/4 "2024-06-07T04:28:35Z")

</div>

Actually, it might be easier to just use the DevKinsta _ **Add new site \>\> Custom Site \>\> Import from Backup** _ option with the zip file exported from Kinsta using the downloadable backup option.

But before importing the zip file, you will need to extract it on your local machine and edit the .sql file to remove the problematic line mentioned on my previous reply. Then create a new zip file for both the WP files and the edited sql file. Then finally do the _ **Import from Backup** _ in DevKinsta.

---

<div class="post-metadata">

### Author: ![leomuniz](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/leomuniz/32/3558_2.png) [@leomuniz](https://community.kinsta.com/u/leomuniz)
#### Post date: [June 7, 2024, 12:46pm UTC](https://community.kinsta.com/t/devkinsta-failed-to-import-database-dump-dk0066-packet-bigger-than-max-allowed-packet/3551/5 "2024-06-07T12:46:32Z")

</div>

Hey guys,  
thank you for your answers.

but, although it has the same error code DK0066, this “Unknown command” is not the error I’m getting. As I said, I tried to manually import the database on an empty WP site, using exactly the steps @Adrian_L shared on his last message and it didn’t work.

When running WP CLI `wp db import backup.sql` I got the error “Got a packet bigger than ‘max\_allowed\_packet’ bytes” - it’s the same error message I’m getting when pulling the entire site from the Kinsta.

I think my issue will be resolved if I can simply increase the `max_allowed_packet` on Docker, but I couldn’t figure out how to do it.

Thank you

---

<div class="post-metadata">

### Author: ![jackirish](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/jackirish/32/1361_2.png) [@jackirish](https://community.kinsta.com/u/jackirish)
#### Post date: [June 7, 2024, 8:59pm UTC](https://community.kinsta.com/t/devkinsta-failed-to-import-database-dump-dk0066-packet-bigger-than-max-allowed-packet/3551/6 "2024-06-07T20:59:26Z")

</div>

If you’re able to open the MariaDB Docker container, the `/etc/mysql/mariadb.conf.d/50-server.cnf` file should have a line similar to this:

`#max_allowed_packet = 1G`

Un-commenting that line by removing the # symbol should allow the database to use the higher value. However if the container is deleted or recreated, the configuration change will be lost.

---

<div class="post-metadata">

### Author: ![leomuniz](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/leomuniz/32/3558_2.png) [@leomuniz](https://community.kinsta.com/u/leomuniz)
#### Post date: [June 8, 2024, 2:00pm UTC](https://community.kinsta.com/t/devkinsta-failed-to-import-database-dump-dk0066-packet-bigger-than-max-allowed-packet/3551/7 "2024-06-08T14:00:06Z")

</div>

Thank you, @jackirish

Uncommenting that line solved my issue and I was able to successfully clone my site.

For those passing by, those were the steps I took:

- Open Docker Dashboard
- Look for the DB container, named `devkinsta_db`
- Click on the three dots “Show container actions” and choose “Open in terminal”
- Once in the terminal,. I needed to install `vim` to edit the file. For this, I ran:
- `apt-get update`
- `apt-get install vim`
- And to open the vim editor:
- `vim /etc/mysql/mariadb,conf.d/50-server.cnf`

If you are not familiarized with vim, you might face some difficulties. Start by locating this row `#row_allowed_packet = 1G`, once your cursor is on it, press the “`a`” key on the keyboard to enter on the edit mode. Erase the `#` and press `esc` to quit the edit mode. Then type `:wq` and presse Enter. (`w` is for saving the file, `q` is for quiting vim). Pay attention to not save this file if you erase or overwrite anything than the `#`.

After that, get back to the Docker dashboard and restart your DB container.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/8/80f8c4e56fecc02327a0964e6bf63a716483529f.png) [@system](https://community.kinsta.com/u/system)
#### Post date: [June 11, 2024, 2:00am UTC](https://community.kinsta.com/t/devkinsta-failed-to-import-database-dump-dk0066-packet-bigger-than-max-allowed-packet/3551/8 "2024-06-11T02:00:56Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
