How to connect Clickhouse and mindsdb

I installed mindsdb through docker.
Click House is already in use.
There is a part of writing mysql address in config.json.
So, do I have to install mysql separately???
I installed mysql
Applied to config.json.
mindsdb runs
It runs, but I don’t know if it’s correct.

INSERT INTO mindsdb.predictors(name, predict, select_data_query, training_options)
VALUES(‘model_name’, ‘target_variable’, ‘SELECT * FROM table_name’, ‘{“additional_training_params:value”}’)

Is it correct to apply the following query to mysql?
I have created a dataset through the screen
no change to mysql

1 Like

Hello @Lee-gahye. If you are using ClickHouse you don’t need to install MySQL as a dependency. The mysql API mentioned in the documentation is an API service that mindsdb will start. To get more information you can follow up this tutorial or the video tutorial. There are two ways to interact with MindsDB and Clcikhouse. The one is using our Studio and the second one is to use clickhouse-client. For creating the configuration I will suggest you to use the MindsDB Studio as described [here]

mindsdb and clickhouse are installed on 192.168.0.90 servers
If so, can I configure config.json like this?

{
“api”: {
“http”: {
“host”: “0.0.0.0”,
“port”: “47334”
},
“mysql”: {
“database”: “mindsdb”,
“host”: “0.0.0.0”,
“password”: “password”,
“port”: “47335”,
“user”: “root”
},
“integrations”: {
“default_clickhouse”: {
“databaset_name”: “mindsdb”,
“host”: “192.168.0.90”,
“password”: “password”,
“port”: “8123”,
“type”: “clickhouse”,
“user”: “default”
}
}
}
}

Clickhouse’s table engine is mysql.
can’t connect to mysql server on ‘0.0.0.0’

Please answer. It’s important

HI Lee, apologies for the delay.
have you tried setting it up via de GUI?
https://docs.mindsdb.com/datasources/clickhouse/

Hello @Lee-gahye, did you follow up the above tutorials that I have shared with you? Also, you can use the link from the GUI that @torrmal shared so you can set up the connection. If you have more questions we are here to help.

I need to set config.json so I can follow the tutorial.
Am I set it right?
I set it like that, but mindsdb doesn’t work well.
Don’t tell me the tutorial link, I want an answer on config.json
please…

Hi @Lee-gahye. There are two ways for setting up the configuration from GUI or config.json. The preferred way is to use GUI. Please check https://docs.mindsdb.com/assets/data/clickhouse.gif. Also, is your ClickHouse on the same machine where you running mindsdb? If not, you need to make a tunnel so your localhost can be acessible.

Thank you for answer.
I connected the clickhouse using gui.
Trained the model.
But the query doesn’t work.
No search and no list.

Can’t look up in Click House.

There could be a minor delay sometimes before you see the columns. If not, can you please share the error message that is inside the browser console?

Sorry for the late reply.

This is the mindsdb’ docker log.


Do you want this?

Are you talking about this?


There is no change in that state.

It looks like there is an issue inside Ligthwood. @paxcema do you have ideas about this error?

You are right @Zoran, some sort of issue in the Model Analysis phase.

@Lee-gahye can you share additional details about the prediction task? A small sample of the dataset would be ideal for us to replicate the issue.

In the meantime I will attempt to track this down. What MindsDB version is this? It should be indicated at the start of the mindsdb docker log.

Versions:

  • lightwood 0.50.0
  • MindsDB_native 2.24.0
  • MindsDB 2.14.0

I would like to give you a sample of the data I have. Please provide your e-mail address and we will attach the data.

What does Ligthwood mean?

Lightwood is the machine learning core of MindsDB, where our predictors are defined. My e-mail is patricio.mardini@mindsdb.com. I would recommend updating your MindsDB installation as version 2.14.0 is quite old by now and it is possible that this issue has been fixed.

I copied the command on the mindsdb homepage and downloaded the image.

But it is down to version 2.14.
You will need to modify the link to get the latest image download.

Using the “docker pull mindsdb/mindsdb:latest” command also doesn’t work.
캡처4

How can I download the latest version?
What is the latest version?