#How to setup clcikhouseDB in proper way?

2 messages · Page 1 of 1 (latest)

icy burrow
#

Hi all,

I'm looking for a good, working solution for laravel + clickhouse!

I have to connect to the tcp port of 9004 on clickhouse server.

I've tried with:
https://packagist.org/packages/glushkovds/phpclickhouse-laravel
without any success, for some reason it's always returns: Can't ping server

My other try was with:
https://packagist.org/packages/cybercog/laravel-clickhouse

where on this:

$test = app(\ClickHouseDB\Client::class)->showTables();

dd($test);

I get:

Received HTTP/0.9 when not allowed

I'm using:

Laravel: v10

PHP: v8.3

indigo ibex
#

The packages mainly use the http interface. Can't you change your clickhouse server to listen to 8123 for http connection?
If you need to use tcp then use for example this package:
smi2/phpclickhouse