AWS Elastic Beanstalk RDS MacOS mysqlclient not working - mysql

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:
packages:
yum:
python3-devel: []
mariadb-devel: []

Related

Install Dreamfactory on Xampp

I have been trying to install Dreamfactory on Xampp but can't find a single article on how to do so.
Purpose: To generate REST API in php with mysql.
What I have tried:
Initially I installed windows version of
Dreamfactory from official site. It was installed successfully but it don't allow access to MYSQL database in free version. Paid version is out of my budget, so I tried with Xampp. I downloaded open-source version from
Github. After extracting it, executed php artisan serve in xampp command shell as mentioned on Dreamfactory Wikipedia Installation guide. This resulted in following error:
Warning: require(D:\xampp\htdocs\sandbox\dreamfactory\public/../vendor/autoload.php): failed to open stream: No such file or directory in D:\xampp\htdocs\sandbox\dreamfactory\public\index.php on line 24
Fatal error: require(): Failed opening required 'D:\xampp\htdocs\sandbox\dreamfactory\public/../vendor/autoload.php' (include_path='D:\xampp\php\PEAR') in D:\xampp\htdocs\sandbox\dreamfactory\public\index.php on line 24
As mentioned in Git documentation, they have given installation procedures for Ubuntu and Debian. Further more, they have mentioned about Bitnami official installation software, but non for XAMPP or stuff like that.
Question:
Is there any way we can install Dreamfactory on XAMPP? If yes, how so!
I'd venture it's going to be fairly difficult task to run DreamFactory on XAMPP because DreamFactory requires quite a few dependencies which are not installed on XAMPP by default.
Your best bet would be to run the Bitnami for DreamFactory environment, or alternatively use Docker. Both can be downloaded from the DreamFactory website downloads page. Alternatively, if you'd like to run DreamFactory in a VM, the OSS download README points to automated installers for Debian and Ubuntu. Additional installers for CentOS and Fedora are found here, they work great however we just haven't moved them into the official distribution yet.

Mysql Connector 8.0 and Python 3.8

I am using Windows 10. I have python 3.8.2 32 bit installed. I am trying to use mysql-installer-web-community-8.0.20.0.msi the connector for Python. The connectors are grayed out and not available. The error message says Python 32-bit not installed. I see old threads claiming you need Python 3.4. The documentation here: https://dev.mysql.com/doc/connector-python/en/connector-python-versions.html claims this will work with Python 3.8.2. Do I need a different MySql installer? If not, what am I doing wrong?
Thanks,
Scott
I am not sure why I was using the MySQL installer to install libraries for Python. In hind-sight, that doesn't make sense. Use pip to install the drivers like
$ pip install mysql-connector-python
# or
$ python pip install mysql-connector
# or for >= Python 3.9
$ pip install mysqlclient
It is not entirely clear what the difference is, but, the first of the three solved the problem.
I faced similar issue while working with MySQL 8.0.18 with Python 3.8 on Windows 10 64 Bit Machine.
And I used the following workaround -
Ensured that all the installers used were 64-Bits installers for My SQL and Python since my machine is Windows 10 64-bit machine.
Ensured that Python Connector for MySQL supported the corresponding python version from https://insidemysql.com/category/mysql-development/connectors/python/ Incase of issues or lack of information downgraded MySql by minor version.
Downloaded independent MSI for Connector from - dev.mysql.com/downloads
Manually installed the downloaded Connector MSI.
Hopefully this information will help you troubleshoot your issue as well by using corresponding 32-bit versions.
If your CPU architecture is 64 bit then be sure that you download MySQL Connector 64 bit version. 32 bit installers would also work but sometimes occurs minor errors. Also MySQL Connector Python requires Python to be in the system’s PATH. Installation fails if python cannot be located. Add python.exe path to System PATH varible. So that MySQL connector can find the execution file.
It is sadly known that MYSQL has low compatibility with python.
For example, I have stepped into this issue while trying to install mysql-python (a terrible one!) and this other issue while using mysqlclient.
There are a lot of python connectors for mysql, you can try some and see one by one if they work. I would recommend pymysql.
However, I would recommend you to use a Postgresql db with python, it really works like charm, and if you want to have a local DBMS/GUI/workbench to work on it, you can use PgAdmin.
I am not sure why I was using the MySQL installer to install libraries for Python. In hind-sight, that doesn't make sense. Use pip to install the drivers like
$ pip install mysql-connector-python
# or
$ python pip install mysql-connector
It is not entirely clear what the difference is, but, the first of the two solved the problem.
Adarsh

Can I install mysql on El Capitan?

I tried using brew to install mysql on OS El Capitan but got this error:
mysql: macOS Sierra or newer is required.
Error: An unsatisfied requirement failed this build.
Is there anyway I could install mysql without updating to Sierra? I don't want to have to buy an external hard drive to backup data for the update.
you can use docker for mac and run any image you want.
https://store.docker.com/editions/community/docker-ce-desktop-mac
P.S. There is no need to install MySQL or anything locally anymore.
when you run docker, to the user it seems like a local installation, everything can run on the same port. What makes a difference is easy of version and overall management.
Really, give it a try

Postfix install fails. MySQL conflict

I'm using CentOS 6, and trying to create a virtual mirror on a new server of an old one (which someone else setup). As much as possible, I want keep everything with the same version, but I've started from scratch and am documenting everything. By default, yum would install MySQL 5.1.73. I downloaded MySQL community v5.1.69 and installed it manually. This required installing a "shared compatibility" package of MySQL v5.1.69 first, and removing mysql-libs.x86_64. With that in place, I successfully mirrored MySQL.
Now, I'm trying to install Postfix. Yum wants to pull version 2.6.6-6. This fails because it requires a dependency that it attempts to install as well: mysql-libs.x86_64 v.5.1.73-5. It splits out a pile of errors messages which are all similar to this:
Transaction Check Error:
file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.73-5.el6_6.x86_64 conflicts with file from package MySQL-server-community-5.1.69-1.rhel5.x86_64
My old server is using postfix v2.6.6-2, which is apparently compatible with MySQL v5.1.69. I found the rpm for that version of postfix. It doesn't install, because it requires mysql-libs. I can't install mysql-libs v.5.1.69, because it conflicts with the MySQL community edition (also 5.1.69) that I installed. I tried to install the MySQL 5.1.73 "shared compatibility" package, but that conflicts with MySQL community too.
I'm going in circles. Is the only way to break this chain to uninstall MySQL community? Must I just use the v5.1.73 default, and the Postfix 2.6.6-6? I don't expect any real problems, but I'm going to end up with slightly different versions of MySQL and Postfix then I am trying hard to mirror.
I gave up, uninstalled all the MySQL community packages, and just installed the out of the box yum MySQL and Postfix. That works, but I now have different versions of this software on these two servers as a result.

Perl: Is it possible to install Mysql module without having Mysql installation?

I'm trying to install the Mysql module on my development machine but it seems to want a local Mysql installation before it will install.
Is there a work around?
I don't need or want a local installation of Mysql, I'm querying a network machine with the installation.
DBD::mysql is a wrapper around the MySQL client libraries. You will at least need to install a client, just like you would need to a client to connect to a remove MySQL server anyway.
You don't specify what system you're on or how you are trying to install DBD::mysql.
You'll need the client libraries (and if you're installing from CPAN - the source of the client libraries) but you should not need MySQL Server. If on a linux the mysql-server package is a dependency of DBD::mysql, it would be a bug.