Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBD::mysql requires MySQL 8.x for building (am using 5.7.44) #405

Closed
ibrierley opened this issue Nov 18, 2023 · 6 comments
Closed

DBD::mysql requires MySQL 8.x for building (am using 5.7.44) #405

ibrierley opened this issue Nov 18, 2023 · 6 comments
Assignees
Labels

Comments

@ibrierley
Copy link

DBD::mysql version

Any from cpan

MySQL client version

5.7.44

Server version

5.7.44

Operating system version

Rocky (Centos) 8

What happened?

I have a custom compiled Perl v5.38.0, and we use mysql 5.7

when trying to install with cpan

cpan DBD::mysql

I get

DBD::mysql requires MySQL 8.x for building. Version reported by mysql_config --version: 5.7.44 at Makefile.PL line 450, line 3.
Warning: No success on command[/opt/perl/bin/perl Makefile.PL]
DVEEDEN/DBD-mysql-5.002.tar.gz
/opt/perl/bin/perl Makefile.PL -- NOT OK

Is there any way around this ?

Thanks

Other information

No response

@ibrierley
Copy link
Author

I can see this restriction is in the Makefile

if ($str !~ /^8./) {

Does anyone know if there is a specific reason for this, will stuff not work with 5.7.x ?

@ibrierley
Copy link
Author

ibrierley commented Nov 18, 2023

Ok, so have installed 5.001 specifically.

I suspect this may catch a few people out, as it feels like a very breaking change, and it's not clear if it's necessarily (rather than advice).

Edit: Actually, it didn't complete correct, investigating
Edit: Ok, have got it in there, but editing the release check for 5.001 as it seemed to check only for v4, odd.

@dveeden
Copy link
Collaborator

dveeden commented Nov 20, 2023

Hi @ibrierley

The official upstream support for MySQL 5.7 has ended. See https://www.mysql.com/support/eol-notice.html for details.

The GA version of MySQL 8.0 was released on 2018-04-19 (about 5 years ago).

During the time of MySQL 8.0 many features have been added. Other products would probably have changed their major version multiple times. However MySQL didn't do this.

To revive DBD::mysql there is a lot of work to do and keeping things compatible with all versions of MySQL 8.0, 8.1, etc is difficult enough. That's why I decided to remove support for MySQL 5.7 and earlier and MariaDB. I also removed support for MySQL Fabric and libmysqld. Keeping things compatible with all versions of both MariaDB and MySQL would need more time and effort and I rather spend that on resolving as many issues as possible.

Some enhancements that I'm looking into like #386 require MySQL 8.0 or newer as well.

As example, some types in MySQL like my_bool and my_ulonglong have been replaced with their native types in MySQL 8.0.

Note that there are a few possibilities for you:

  • Use DBD::mysql v4. I intent to keep v4 around for situations like this. Just don't expect any major changes/improvements in v4.
  • Compile DBD::mysql against MySQL 8.x client libraries and keep using MySQL 5.7 as server.
  • Use DBD::mysql as provided by your OS.

@dveeden dveeden closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2023
@choroba
Copy link

choroba commented Nov 20, 2023

You can also try switching to DBD::MariaDB. It still supports 5.7 and there are no plans to remove the support.

@jberger
Copy link

jberger commented Dec 19, 2023

It is rather unfortunate that running cpanm DBD::mysql on perl:latest docker image fails. No I know that isn't necessarily a project goal, however, it is an impediment to users who hit quite a hard wall at that point.

@Grinnz
Copy link
Contributor

Grinnz commented Dec 20, 2023

For anyone seeking to switch to DBD::MariaDB, I've written a blog post detailing a bit of what to watch out for: https://blogs.perl.org/users/grinnz/2023/12/migrating-from-dbdmysql-to-dbdmariadb.html

freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue Apr 6, 2024
In new branch 5.x upstream removed support of the MariaDB and MySQL 5.7
and earlier:
perl5-dbi/DBD-mysql#405 (comment)
This break a lot of installations with MariaDB.
Also DBD-MariaDB (databases/p5-DBD-MariaDB) isn't compatable with
DBD-mysql and most of ports doesn't support it.

PR:			277889 275100
Approved by:		flo, arrowd (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D44524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants