MySQL Forums
Forum List  »  MySQL & Kubernetes

MySQL, Docker and Python/Django
Posted by: mark wilson
Date: May 03, 2021 07:57AM

I have a MySQL server running on my local Mac and I can connect to this database using Python3 and Django. I am quite happy with how this works.

However, I would like to be able to connect to this database using Django from within a Docker container and I cannot get this to work because I cannot install mysqlclient within the Dockerfile correctly. I have also tried to use python mysql connector, but I cannot get this to work properly either.

Could someone please help with this.

I have added a basic project to GitHub to help demonstrate the type of problems that I am having and I would really appreciate some help. This github repository should show the Dockerfile that I am currently using:

Many thanks


Options: ReplyQuote

Written By
MySQL, Docker and Python/Django
May 03, 2021 07:57AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.