连接到Silex中的数据库

i have

    $app->register(new Silex\Provider\DoctrineServiceProvider(), array(
    'db.options' => array(
        'dbname' => 'dbname',
        'user' => 'user',
        'password' => '',
        'host' => 'host',
        'driver' => 'pdo_mysql'
    ),
));

which is correct, i can connect to the database within PHPStorm directly with the same credentials inserted in this register. But when i

echo '<pre>' . var_export($app['db'], true) . '</pre>';

i get:

https://gyazo.com/7b9a106c1c44e012ff20bd34b698303c

I don't understand why it's not saying isConnected = true because the credentials are correct.

EDIT: Query attempt based on silex docs example enter image description here

This results in the same "Whoops, looks like something went wrong" error.