Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The connection example in the readme does not work #62

Open
maluramichael opened this issue Mar 18, 2024 · 0 comments
Open

The connection example in the readme does not work #62

maluramichael opened this issue Mar 18, 2024 · 0 comments

Comments

@maluramichael
Copy link

I tried the symfony example in the readme and only get http errors from clickhouse. I created a trial account on their page, got the credentials and enabled the mysql interface. Their example works fine in the terminal.

mysql -h MY_INSTANCE.eu-central-1.aws.clickhouse.cloud -u MY_USER -P 3306 --password

But no matter what i set in my doctrine.yml file i get errors like this

Could not create database `myproject` for connection named default
An exception occurred while executing 'CREATE DATABASE `myproject`':

Received HTTP/0.9 when not allowed```

The port 8123 you provided in the readme also does not work.

In DBALException.php line 185:

An exception occurred while executing 'SELECT database, name FROM system.tables WHERE database != 'system' AND engine != 'View'':

An exception occurred while executing 'SELECT database, name FROM system.tables WHERE database != 'system' AND engine != 'View'':

Failed to connect to MY_INSTANCE.eu-central-1.aws.clickhouse.cloud port 8123 after 5004 ms: Timeout was reached


My config looks like this.

```yaml
doctrine:
    dbal:
        host:          MY_INSTANCE.eu-central-1.aws.clickhouse.cloud
        port:          3306
        user:          default
        password:      "MY_PASSWORD"
        dbname:        myproject
        driver_class:  FOD\DBALClickHouse\Driver
        wrapper_class: FOD\DBALClickHouse\Connection
        options:
            enable_http_compression: 1
            max_execution_time:      60

And i get this error

bin/console doctrine:schema:update --dump-sql --complete --force

In DBALException.php line 185:

  An exception occurred while executing 'SELECT database, name FROM system.tables WHERE database != 'system' AND engine != 'View'':

  An exception occurred while executing 'SELECT database, name FROM system.tables WHERE database != 'system' AND engine != 'View'':

  Received HTTP/0.9 when not allowed


In DBALException.php line 185:

  An exception occurred while executing 'SELECT database, name FROM system.tables WHERE database != 'system' AND engine != 'View'':

  Received HTTP/0.9 when not allowed


In Statement.php line 190:

  Received HTTP/0.9 when not allowed


doctrine:schema:update [--em EM] [--complete] [--dump-sql] [-f|--force]```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant