# Execute a command from host to docker using terminal

Sometimes you just want to import your own MySQL backup file.

This can be done in a very easy way, even without bind-mounting or copying the file into the container. It also does not have to do with dockware, so it would also work in a plain MySQL container.

## Import using Terminal

Run this command, and it will automatically import the **backup.sql** file from your **database** folder into your MySQL instance.

```
// Import script for mysql
// make sure to create if NEWDB eixist or else create new one
docker exec -i shop mysql -uroot -proot NEWDB < Users/demon/Downloads/Existing.sql
```

#### for more details take a look at  [Import Database](/use-cases/tips-and-tricks/how-do-you-import-the-database-using-cli.md)


---

# 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.meetjoshi.com/use-cases/tips-and-tricks/execute-a-command-from-host-to-docker-using-terminal.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.
