osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MySQLdb for 3.6 on RHEL7


On Wed, Aug 14, 2019 at 9:27 AM DL Neil <PythonList at danceswithmice.info> wrote:
>
> On 14/08/19 6:14 AM, Chris Angelico wrote:
> > That seems very odd. The mysqlclient binary might be just under a
> > different name? I'm not familiar with RHEL, but on my Debian, there
> > are packages like "mysql-server-5.7" and corresponding
> > "mysql-client-5.7". Or do you mean the Python client?
>
> Just in case: please be aware that the MySQL-client which enables a
> cmdLN interface to the server, is quite different from the
> Python-Connector which will be called from Python code.

Hmm. Where would the C libraries be? I would have thought
"mysql-client" included the necessary binary library for the Python
MySQL .so to link against.

It's been ages since I dug into any of the details of MySQL setup. I
moved completely to PostgreSQL years ago and haven't looked back.

> As Chris has said, there are combinations of clients and servers, many
> of which are incompatible. Like him, I've stuck with MySQL v5 by reason
> of exactly this sort of inter-dependence (MySQL-Workbench? - admittedly
> a decision made, I estimate, over one year ago) - whereas MySQL
> Community will 'favor' v8.n!

Actually I've "stuck" with version 5 simply because it's currently
installed here and I haven't seen fit to uninstall it. Which probably
means that Debian's repositories are still shipping a 5.x. But on
analysis, this is turning out to be actually MariaDB... no idea
whether that's significant or not.

> Recommend:
> - clear-out 'everything' MySQL-related
> - install the MySQL (Community) site's repo (v5 or v8, as you see fit)
> - using rpm/yum/dnf, assemble your tool-set directly from them
> (single-source!)
> - test using the MySQL cmdLN client
> - only thereafter move to testing the Python/Django connection.

That sounds like a good plan.

> I have no problems with/complaints about MySQL's Python-Connector (and
> usually stick to the simpler interface/API).
>
> Various alternative interfaces (to MySQL's) seem quite similar, and
> often require identical code/function calls from within Python...
>
> I can't speak to the Django-MySQL interface.
>
> When the time comes, your client can shell-out for MySQL support, and
> build (essentially) the same environment for the 'live env', from those
> repos!

Another thing to consider is additional middleware like SQLAlchemy,
which may make things easier, but may just add more complications.

ChrisA