7stud has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to install DBD::mysql so that I can use perl's DBI.
... ... Test Summary Report ------------------- t/40server_prepare.t (Wstat: 256 Tests: 31 Failed: 1) Failed test: 27 Non-zero exit status: 1 t/40server_prepare_crash.t (Wstat: 11 Tests: 3 Failed: 0) Non-zero wait status: 11 Parse errors: Bad plan. You planned 39 tests but ran 3. t/40server_prepare_error.t (Wstat: 512 Tests: 3 Failed: 2) Failed tests: 1-2 Non-zero exit status: 2 Files=69, Tests=2041, 34 wallclock secs ( 0.52 usr 0.17 sys + 3.90 c +usr 0.77 csys = 5.36 CPU) Result: FAIL Failed 3/69 test programs. 3/2041 subtests failed. make: *** [test_dynamic] Error 255 MICHIELB/DBD-mysql-4.043.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports MICHIELB/DBD-mysql-4.043.tar.gz $
$ brew info mariadb mariadb: stable 10.2.12 (bottled), devel 10.3.4 Drop-in replacement for MySQL https://mariadb.org/ Conflicts with: mariadb-connector-c (because both install plugins) mysql (because mariadb, mysql, and percona install the same binaries +.) mysql-cluster (because mariadb, mysql, and percona install the same +binaries.) mysql-connector-c (because both install MySQL client libraries) mytop (because both install `mytop` binaries) percona-server (because mariadb, mysql, and percona install the same + binaries.) /usr/local/Cellar/mariadb/10.2.12 (640 files, 170MB) * Poured from bottle on 2018-01-27 at 00:05:02 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/ma +riadb.rb ==> Dependencies Build: cmake ✘ Required: openssl ✔ ==> Options --with-archive-storage-engine Compile with the ARCHIVE storage engine enabled --with-bench Keep benchmark app when installing --with-blackhole-storage-engine Compile with the BLACKHOLE storage engine enabled --with-embedded Build the embedded server --with-libedit Compile with editline wrapper instead of readline --with-local-infile Build with local infile loading support --with-test Keep test when installing --devel Install development version 10.3.4 ==> Caveats A "/etc/my.cnf" from another install may interfere with a Homebrew-bui +lt server starting up correctly. MySQL is configured to only allow connections from localhost by defaul +t To connect: mysql -uroot To have launchd start mariadb now and restart at login: brew services start mariadb Or, if you don't want/need a background service you can just run: mysql.server start $
use strict; use warnings; use 5.020; use autodie; use Data::Dumper; use DBI; my $dsn = 'dbi:mariadb:database=my_db;host=localhost'; my $dbh = DBI->connect($dsn, 'root', ''); --output:-- DBD::mariadb initialisation failed: Can't locate object method "driver +" via package "DBD::mariadb" at /Users/7stud/perl5/perlbrew/perls/per +l-5.20.2/lib/site_perl/5.20.2/darwin-2level/DBI.pm line 827.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: DBD::mysql and MariaDB
by 7stud (Deacon) on Feb 08, 2018 at 07:03 UTC | |
Re: DBD::mysql and MariaDB
by Spenser (Friar) on Mar 23, 2018 at 11:25 UTC | |
by choroba (Cardinal) on Mar 23, 2018 at 12:50 UTC |