This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use DBIish; | |
| # The file 'lib.pl' customizes the testing environment per DBD, but all | |
| # this test script currently needs is the variables listed here. | |
| my $mdriver = 'mysql'; | |
| my $host = 'localhost'; | |
| my $port = 3306; | |
| my $database = 'zavolaj'; | |
| my $test_user = 'root'; | |
| my $test_password = ''; | |
| my $drh; | |
| $drh = DBIish.install_driver($mdriver); | |
| say $drh.Version; | |
| my $dbh = DBIish.connect($mdriver, :user($test_user), :password($test_password), | |
| :$host, :$port, :$database, | |
| RaiseError => 1, PrintError => 1, AutoCommit => 0 | |
| ); | |
| # die "ERROR: {MiniDBI.errstr}. Can't continue test" if $!.defined; | |
| if $dbh.defined { | |
| say "Connected to database"; | |
| } | |
| $dbh.disconnect(); | |
| ------------------- | |
| Cannot locate native library 'libmysqlclient.bundle' | |
| in method postcircumfix:<( )> at lib/NativeCall.pm6:122 | |
| in at src/gen/BOOTSTRAP.pm:883 | |
| in any at src/gen/BOOTSTRAP.pm:867 | |
| in method connect at lib/DBDish/mysql.pm6:282 | |
| in method connect at lib/DBIish.pm6:9 | |
| in block at baza.pl:17 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment