Rose and DBD::MariaDB

23 views
Skip to first unread message

jfrm

unread,
Oct 31, 2018, 7:31:00 PM10/31/18
to Rose::DB::Object
Dear All and Anyone,

I've got a new installation; Windows 10 with latest updates, Mysql community-8.0.12.0 and I've installed Strawberry Perl 5.28.0.1-64bit. Rose:DB and Image::Magick. Updated to latest DBI and DBD-mysql. When I attempt to use it I get:
install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.
Compilation failed in require at (eval 456) line 3.
 at (eval 456) line 3.
    eval 'package            # hide from PAUSE
        DBI::_firesafe;        # just in case
        require DBD::mysql;    # load the driver
    ' called at C:/Strawberry/perl/vendor/lib/DBI.pm line 789


I won't bore you with more details suffice to say many hours wasted so far. I posted on Perl Monks and choroba suggested the following:
    DBD::mysql has problems with clients version 8+. Could you try installing DBD::MariaDB instead? It's a fork of the former module that fixes compatibility with the recent clients among other things.
So the obvious question: Is DBD::MariaDB compatible with Rose::DB::Object and if so, how does one configure Rose to use DBD::MariaDB instead of DBD::mysql?

thanks,

James.

Peter Karman

unread,
Nov 1, 2018, 11:28:55 AM11/1/18
to rose-db...@googlegroups.com
jfrm wrote on 10/31/18 6:31 PM:

>
> So the obvious question: Is DBD::MariaDB compatible with Rose::DB::Object and if
> so, how does one configure Rose to use DBD::MariaDB instead of DBD::mysql?

I haven't tried it, but I think the answer is "yes" and that it would require a
bit more than just configuration.

I would first try subclassing Rose::DB::MySQL

package Rose::DB::MariaDB;
our @ISA = qw( Rose::DB::MySQL );
sub dbi_driver { 'mariadb' }
1;

and specify 'mariadb' as the 'driver' value to Rose::DB.

If subclassing isn't sufficient (and I suspect it is not), you might need to
just copy Rose/DB/MySQL.pm to Rose/DB/MariaDB.pm and search and replace the
mysql for mariadb till you can massage it into shape.

The clients should be compatible. You just need the Rose layer to use the right
driver.

pek
--
Peter Karman . he/him/his . 785.337.0405 . https://karpet.github.io/

jfrm

unread,
Nov 2, 2018, 3:11:57 PM11/2/18
to Rose::DB::Object


Thanks for the tip.  This may be a bit beyond me, I suspect, but luckily I've found another way by using Active State Perl which does seem to have a working DBD::mysql driver.  Maybe someone else might take it on at some point...
 

Alexander Karelas

unread,
Nov 2, 2018, 5:00:38 PM11/2/18
to rose-db...@googlegroups.com

I think youi could use DBD::mysql 4.046, which (I think) works with mariaDB (instead of the latest which is 4.048)

On 2/11/18 9:11 μ.μ., jfrm wrote:


Thanks for the tip.  This may be a bit beyond me, I suspect, but luckily I've found another way by using Active State Perl which does seem to have a working DBD::mysql driver.  Maybe someone else might take it on at some point...
 
--
Source: https://github.com/siracusa/rose
CPAN: http://search.cpan.org/dist/Rose-DB-Object
---
You received this message because you are subscribed to the Google Groups "Rose::DB::Object" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rose-db-objec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages