Peewee connection error(2003) from docker container to MySQL

I am facing an issue while I am connecting to Mysql database from Docker. It shows that it can't connect to the MySQL server. But while using SQLite we are able to connect to the prodigy server from docker and in windows, we are able it is able to connect to the Mysql database but through docker, we can't. Can you please look into this issue

thank you,

Hey,

I am facing an issue with MySQL connection while running prodigy recipe(ner.manual) from Docker. Please consider the below screenshot for reference.

Although, it's working fine on windows. Kindly let me know what needs to do next.

Thank you!
Aaina.

P.S.: Please refer below prodigy.json screenshot.

I've merged both issues onto the same thread, since they're discussing the same problem. (Do you have two accounts? The screenshots posted look identical. If so, there's usually no reason to post a topic twice, it just makes it harder for us to keep track of and answer all questions.)

The error is raised by peewee, which Prodigy uses to manage database connections, and it indicates that for some reason, your MySQL connection timed out. Maybe you need to increase the connection timout limit in your container.

In any case, try connecting to your database with peewee directly, in a small script etc. and test a few opterations. This lets you isolate the database connection and makes it easier to debug. If you can connect with peewee and write to and read from your database, it should work fine in Prodigy. You can also use the test_database.py test script from here to check your connection from Prodigy.

Hey, He is my colleague. Mistakenly, we both raised the same issue in the community. Sorry for the inconvenience.

As advised, we tried connecting to our database directly through peewee. we got the issue. It was related to the IP address. Now, it's working fine. Thank you for your follow up.

1 Like