# Importing database

To import the database use the [import-db](/v1/getting-started/available-commands/import-db.md) command.

{% hint style="warning" %}

### **Heads up!**

If you are running a version older than **magento-scripts\@1.6.0**, you will need to start project manually using [start command](/v1/getting-started/available-commands/start.md)!
{% endhint %}

{% tabs %}
{% tab title="Yarn" %}

```bash
yarn import-db <dump file path>
```

{% endtab %}

{% tab title="NPM" %}

```bash
npm run import-db <dump file path>
```

{% endtab %}
{% endtabs %}

When the command is called, multiple steps are executed to ensure the success of the import. These steps are as follows:

* A connection established with MySQL
* Theme configurations will be dumped and restored after the dump is imported
* The dump will be imported into MySQL from the specified file
* It will be ensured that dump will work with CMA set up by setting necessary configuration values
* And Magento setup will be running to finish the configuration.

To import database from remote ssh server, use the following guide:

{% content-ref url="/pages/-Mchm5W0CLqGRl1Y1PU1" %}
[Importing remote database](/v1/usage-guide/importing-database/importing-remote-database.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.create-magento-app.com/v1/usage-guide/importing-database.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
