[SOLVED] AWS Elastic Beanstalk RDS MacOS mysqlclient not working


I’m trying to set up an application with Django through Elastic Beanstalk and MySQL through RDS. I can successfully use the application on localhost with the MySQL RDS database. When I deploy, I have problems.

I get

"111: Connection refused"

but maybe more importantly

"mysql_config: command not found, mariadb_config: command not found, mysql_config: command not found"

Posts on here talk about using yum in a packages.config file, I tried those suggestions without success. Isn’t yum for use on operating systems other than MacOS?

I followed the instructions here: https://pypi.org/project/mysqlclient/

And of course mysqlclient is in my requirements.txt

Obviously I need the files mentioned above, but how do I get them?


mysqlclient is just like a python wrapper, and it needs the MySQL client binary (and other required tools) installed on the OS. The binary installation varies based on the server OS.

I believe by what you said MacOS is your computer OS, not the server OS, right? You must check your Elastic Bean configuration and install the required binaries based on your Elastic Bean OS. For knowing what the required binaries are, you can refer to the mysqlclient docs (Windows, Linux, MacOS)

Taking an example from an SO answer, one of yaml config to install the binary:

    python3-devel: []
    mariadb-devel: []

Answered By – hashlash

Answer Checked By – Marie Seifert (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *