Cant use MindsDB on mysql database

This messages appears after trying to start the application. I’m trying to use it with mysql. I’m using windows 10.

Config file:

api
http
host “127.0.0.1”
port “47334”
mysql
host “127.0.0.1”
password “”
port “47335”
user “root”
config_version “1.3”
debug false
integrations
default_mysql
enabled true
host “localhost”
password “macaco29”
port 3306
type “mysql”
user “guilherme”
storage_dir “storage/”

C:\Program Files\MindsDB\python>python.exe -m mindsdb --api=mysql --config=config.json

✓ telemetry enabled

S3 Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
Microsoft SQL Server Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
Athena Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
Google Cloud Storage Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
Versions:

  • lightwood 0.61.1
  • MindsDB_native 2.34.0
  • MindsDB 2.22.0
    Configuration file:
    config.json
    Storage path:
    storage/
    Traceback (most recent call last):
    File “D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\runpy.py”, line 193, in _run_module_as_main
    File “D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\runpy.py”, line 85, in run_code
    File "C:\Program Files\MindsDB\python\lib\site-packages\mindsdb_main
    .py", line 96, in
    dbw.register_predictors(model_data_arr)
    File “C:\Program Files\MindsDB\python\lib\site-packages\mindsdb\interfaces\database\database.py”, line 50, in register_predictors
    for integration in self._get_integrations():
    File “C:\Program Files\MindsDB\python\lib\site-packages\mindsdb\interfaces\database\database.py”, line 45, in _get_integrations
    integrations = [self._get_integration(x) for x in self.config[‘integrations’]]
    File “C:\Program Files\MindsDB\python\lib\site-packages\mindsdb\interfaces\database\database.py”, line 45, in
    integrations = [self._get_integration(x) for x in self.config[‘integrations’]]
    File “C:\Program Files\MindsDB\python\lib\site-packages\mindsdb\interfaces\database\database.py”, line 25, in _get_integration
    if self.config[‘integrations’][db_alias][‘publish’]:
    KeyError: ‘publish’
    Sentry is attempting to send 2 pending error messages
    Waiting up to 2 seconds
    Press Ctrl-Break to quit
1 Like

Hi @GuilhermeCarrijo can you add “publish”: true inside the default_mysql key. Check the docs example for more info MySQL - MindsDB Documentation. So instead of enabled=true it should be publish. I will edit the tutorial and include the correct key. Also, we should assume this by default and don’t throw an error if the key is missing. Thanks

Hello @GuilhermeCarrijo. Did the above solution worked for you?