Driver setup

Learn how to install and get started with the CrateDB PDO driver.

Prerequisites

Your project must be using Composer.

Set up as a dependency

The driver is available as a package at crate/crate-pdo. Add the driver package to your project’s composer.json.

composer require crate/crate-pdo

Install

Once the package has been configured as a dependency, you can install it.

composer install

Afterward, if you are not already doing so, you must require the Composer autoload.php file. You can do this by adding a line like this to your PHP application.

require __DIR__ . '/vendor/autoload.php';

See also

For more help with Composer, consult the Composer documentation.

Next steps

Learn how to connect to CrateDB.