---
title: How to Interact with MindsDB from PHP
sidebarTitle: MindsDB and PHP
---

To get started with MindsDB, you need to install MindsDB locally via [Docker](/setup/self-hosted/docker) or [Docker Desktop](/setup/self-hosted/docker-desktop).

There are a few ways you can interact with MindsDB from the PHP code.

1. You can connect to MindsDB using the [PHP Data Objects](https://www.php.net/manual/en/book.pdo.php) and execute statements directly on MindsDB with the `PDO::query` method.

2. You can use the [REST API](/rest/overview) endpoints to interact with MindsDB directly from PHP.
