Result:
found 121 distributions and 204 files matching your query ! ( run in 0.650 )


Perl-PrereqScanner-NotQuiteLite

 view release on metacpan or  search on metacpan

t/scan/pod.t  view on Meta::CPAN

    },
    'mysql5' => {
      'dbi'               => 'mysql',
      'user'              => 'root',
      'use_drh'           => 1,
      'mysql_enable_utf8' => 1,
      'varchar_max'       => 65530,
      'unique_max'        => 1000,
      'primary_max'       => 999,
      'fulltext_max'      => 1000,
      'err_connection'    => [qw( 1 1040 1053 1129 1213 1226 2002 2003 2006 2013 )],

t/scan/pod.t  view on Meta::CPAN

        $self->set_names() if $ENV{'MOD_PERL'} || $ENV{'FCGI_ROLE'};
      },
      'params' => [
        qw(host port database mysql_client_found_rows mysql_compression mysql_connect_timeout mysql_read_default_file mysql_read_default_group mysql_socket
          mysql_ssl mysql_ssl_client_key mysql_ssl_client_cert mysql_ssl_ca_file mysql_ssl_ca_path mysql_ssl_cipher
          mysql_local_infile mysql_embedded_options mysql_embedded_groups mysql_enable_utf8)
      ],    # perldoc DBD::mysql
      'insert_by' => 1000, ( !$ENV{'SERVER_PORT'} ? ( 'auto_check' => 1 ) : () ), 'unique name' => 1,    # test it
      'match' => sub {
        my $self = shift;
        my ( $param, $param_num, $table, $search_str, $search_str_stem ) = @_;

 view all matches for this distribution


Prancer-Plugin-Database

 view release on metacpan or  search on metacpan

lib/Prancer/Plugin/Database/Driver/MySQL.pm  view on Meta::CPAN

        'AutoCommit' => $autocommit,
        'RaiseError' => 1,
        'PrintError' => 0,
    };
    if ($charset && $charset =~ /^utf8$/xi) {
        $params->{'mysql_enable_utf8'} = 1;
    }

    # merge in any additional dsn_params
    $params = $self->_merge($params, $self->{'_dsn_extra'});

 view all matches for this distribution


Prancer-Session-Store-Database

 view release on metacpan or  search on metacpan

lib/Prancer/Session/Store/Database/Driver/MySQL.pm  view on Meta::CPAN

        'AutoCommit' => 0,
        'RaiseError' => 1,
        'PrintError' => 0,
    };
    if ($charset && $charset =~ /^utf8$/xi) {
        $params->{'mysql_enable_utf8'} = 1;
    }

    # merge in any additional dsn_params
    $params = $self->_merge($params, $self->{'_dsn_extra'});

 view all matches for this distribution


Project-Easy

 view release on metacpan or  search on metacpan

lib/Project/Easy/Helper.pm  view on Meta::CPAN

	"pass": null,
	"driver_name": "mysql",
	"attributes": {
		"database" : null,
		"mysql_multi_statements": 0,
		"mysql_enable_utf8": 1,
		"mysql_auto_reconnect": 1,
		"mysql_read_default_group": "perl",
		"mysql_read_default_file": "{$root}/etc/my.cnf"
	},
	"options": {

 view all matches for this distribution


Prosody

 view release on metacpan or  search on metacpan

lib/Prosody/Storage/SQL.pm  view on Meta::CPAN

			name_sep                => '.',
		};
		if ($self->driver eq 'SQLite3') {
			$vars->{sqlite_unicode} = 1;
		} elsif ($self->driver eq 'MySQL') {
			$vars->{mysql_enable_utf8} = 1,
		} elsif ($self->driver eq 'PostgreSQL') {
			$vars->{pg_enable_utf8} = 1,
		};
		Prosody::Storage::SQL::DB->connect($self->dsn, $self->username, $self->password, $vars);
	},

 view all matches for this distribution


Prty

 view release on metacpan or  search on metacpan

lib/Prty/Database/Api/Dbi/Connection.pm  view on Meta::CPAN

            # keine \-Escapes in String-Literalen zulassen
            $dbh->do("SET standard_conforming_strings = ON");
        }
        elsif ($dbms eq 'mysql') {
            if ($utf8) {
                $dbh->{'mysql_enable_utf8'} = 1;
                $dbh->do('SET NAMES utf8');
            }
            # Schalte in den "Strict SQL Mode"
            $dbh->do("SET sql_mode = 'STRICT_TRANS_TABLES'");
        }

 view all matches for this distribution


Pye-SQL

 view release on metacpan or  search on metacpan

lib/Pye/SQL.pm  view on Meta::CPAN

	if ($opts->{db_type} eq 'mysql') {
		'DBI:mysql:database='.
			($opts->{database} || 'logs').
				';host='.($opts->{host} || '127.0.0.1').
					';port='.($opts->{port} || 3306).
						';mysql_enable_utf8=1';
	} elsif ($opts->{db_type} eq 'pgsql') {
		'dbi:Pg:dbname='.
			($opts->{database} || 'logs').
				';host='.($opts->{host} || '127.0.0.1').
					';port='.($opts->{port} || 5432);

 view all matches for this distribution


QBit-Application-Model-DB-mysql

 view release on metacpan or  search on metacpan

lib/QBit/Application/Model/DB/mysql.pm  view on Meta::CPAN

            {
                PrintError           => 0,
                RaiseError           => 0,
                AutoCommit           => 1,
                mysql_auto_reconnect => 1,
                mysql_enable_utf8    => 1,
            },
        ) || throw DBI::errstr();
    }
}

 view all matches for this distribution


Quiq

 view release on metacpan or  search on metacpan

lib/Quiq/Database/Api/Dbi/Connection.pm  view on Meta::CPAN

            # keine \-Escapes in String-Literalen zulassen
            $dbh->do("SET standard_conforming_strings = ON");
        }
        elsif ($dbms eq 'mysql') {
            if ($utf8) {
                $dbh->{'mysql_enable_utf8'} = 1;
                $dbh->do('SET NAMES utf8');
            }
            # Schalte in den "Strict SQL Mode"
            $dbh->do("SET sql_mode = 'STRICT_TRANS_TABLES'");
        }

 view all matches for this distribution


RTx-FillTicketData

 view release on metacpan or  search on metacpan

lib/RTx/FillTicketData.pm  view on Meta::CPAN

    }

    my %more_attrs;
    given ($db_config->{type}) {
        when ('mysql') {
            %more_attrs = ( mysql_enable_utf8 => 1 );
        }
        when ('Pg') {
            %more_attrs = ( pg_enable_utf8 => 1 );
        }
    }

 view all matches for this distribution


RapidApp

 view release on metacpan or  search on metacpan

lib/Plack/App/RapidApp/rDbic.pm  view on Meta::CPAN


Optional ArrayRef of connect_options to be added to the C<%extra_attributes> of the C<connect_info>.
(See L<DBIx::Class::Storage::DBI/connect_info>). Like C<loader_options>, these should be supplied 
as a list of name=value pairs, for example:

  connect_options => [qw/quote_names=0 mysql_enable_utf8=0/]

Note: the options in the above example are both set to C<'1'> by default (second only for MySQL).
So the above example is how you would go about turning these options off if needed for some reason.

=head2 total_counts_off

 view all matches for this distribution


Rose-DB

 view release on metacpan or  search on metacpan

lib/Rose/DB.pm  view on Meta::CPAN


Constructs and connects the L<DBI> database handle for the current data source, calling L<dbi_connect|/dbi_connect> to create a new L<DBI> database handle if none exists.  If there is no registered data source for the current L<type|/type> and L<doma...

If any L<post_connect_sql|/post_connect_sql> statement failed to execute, the database handle is disconnected and then discarded.

If the database handle returned by L<dbi_connect|/dbi_connect> was originally connected by another L<Rose::DB>-derived object (e.g., if a subclass's custom implementation of L<dbi_connect|/dbi_connect> calls L<DBI>'s L<connect_cached|DBI/connect_cach...

Returns true if the database handle was connected successfully and all L<post_connect_sql|/post_connect_sql> statements (if any) were run successfully, false otherwise.  

=item B<connect_option NAME [, VALUE]>

 view all matches for this distribution


SQL-Easy

 view release on metacpan or  search on metacpan

lib/SQL/Easy.pm  view on Meta::CPAN

        $self->{password},
        {
            PrintError => 0,
            RaiseError => 1,
            mysql_auto_reconnect => 0,
            mysql_enable_utf8 => 1,
        },
    ) or croak "Can't connect to database. Error: " . $DBI::errstr . " . Stopped";

    return $dbh;
}

 view all matches for this distribution


Schedule-LongSteps

 view release on metacpan or  search on metacpan

lib/Schedule/LongSteps/Storage/AutoDBIx/Schema.pm  view on Meta::CPAN

    my ($class, @args ) = @_;
    unless( ( ref $args[0] || '' ) eq 'CODE' ){
        defined( $args[3] ) or ( $args[3] = {} );
        $args[3]->{AutoCommit} = 1;
        $args[3]->{RaiseError} = 1;
        $args[3]->{mysql_enable_utf8} = 1;
        ## Only for mysql DSNs
        $args[3]->{on_connect_do} = ["SET SESSION sql_mode = 'TRADITIONAL'"];
    }
    my $self = $class->next::method(@args);
    return $self;

 view all matches for this distribution


Scope-Container-DBI

 view release on metacpan or  search on metacpan

lib/Scope/Container/DBI.pm  view on Meta::CPAN

      my $contaier = start_scope_container();

      # first connect
      my $dbh = Scope::Container::DBI->connect(
          'dbi:mysql:mydb;host=myhost', 'myuser', 'mypasswd',
          { RaiseError => 1, mysql_connect_timeout => 4, mysql_enable_utf8 => 1 }
      );

      # same dsn, user/pass, and attributes, reuse connection
      my $dbh2 = Scope::Container::DBI->connect(
          'dbi:mysql:mydb;host=myhost', 'myuser', 'mypasswd',
          { RaiseError => 1, mysql_connect_timeout => 4, mysql_enable_utf8 => 1 }
      );

      #disconnect
  }

 view all matches for this distribution


Serge

 view release on metacpan or  search on metacpan

lib/Serge/DB.pm  view on Meta::CPAN

        'begin_transaction_stmt' => 'BEGIN',
    },

    'mysql' => {
        'options' => {
            'mysql_enable_utf8' => 1,
            'mysql_bind_type_guessing' => 1,
        },
        'begin_transaction_stmt' => 'START TRANSACTION',
    },

 view all matches for this distribution


Service-Engine

 view release on metacpan or  search on metacpan

lib/Service/Engine/Data/Mysql.pm  view on Meta::CPAN

    
    if (!$attributes->{'database'} || !$attributes->{'hostname'} || !$attributes->{'username'} || !$attributes->{'password'}) {
        $Log->log({msg=>"mysql requires a database, hostname, username and password",level=>1});
    } else {
        my $datasource = 'DBI:mysql:' . $attributes->{'database'} . ':' . $attributes->{'hostname'} . ':' . $attributes->{'port'};
        my $db = DBI->connect($datasource, $attributes->{'username'}, $attributes->{'password'},{ RaiseError => $attributes->{'raise_error'}, mysql_enable_utf8mb4 => 1, mysql_auto_reconnect => 1 });
        $attributes->{'handle'} = $db;
        $Log->log({msg=>"creating connection to $datasource",level=>3});
    }

    my $self = bless $attributes, $class;

lib/Service/Engine/Data/Mysql.pm  view on Meta::CPAN

}

sub reconnect {
    my ($self) = @_;  
    my $datasource = 'DBI:mysql:' . $self->{'database'} . ':' . $self->{'hostname'} . ':' . $self->{'port'};
    my $db = DBI->connect($datasource, $self->{'username'}, $self->{'password'},{ RaiseError => $self->{'raise_error'}, mysql_enable_utf8mb4 => 1, mysql_auto_reconnect => 1 });
    $Log->log({msg=>"re-connecting to $datasource",level=>3});
    $self->{'handle'} = $db;  
    return $self->{'handle'};
}

 view all matches for this distribution


SimpleDBI

 view release on metacpan or  search on metacpan

lib/SimpleDBI/mysql.pm  view on Meta::CPAN

    );
    my $conn_str =
      join( ";", map { "$_=$default_opt{$_}" } keys(%default_opt) );

    my $dbh = DBI->connect( "DBI:mysql:$conn_str", $opt{usr}, $opt{passwd},
        { 'RaiseError' => 0, PrintError => 1, mysql_enable_utf8=> $opt{enable_utf8} ,  } ), 
          or die $DBI::errstr;

    return $dbh;
}

 view all matches for this distribution


Sphinx-Search

 view release on metacpan or  search on metacpan

lib/Sphinx/Search.pm  view on Meta::CPAN

This is the Perl API client for the Sphinx open-source SQL full-text indexing
search engine, L<http://www.sphinxsearch.com>.

Since 0.9.9, Sphinx supports a native MySQL-protocol client, i.e. DBI with DBD::mysql. That is, you can configure the server to have a mysql41 listening port and then simply do

  my $dbh = DBI->connect('dbi:mysql:host=127.0.0.1;port=9306;mysql_enable_utf8=1') or die "Failed to connect via DBI";
  my $sth = $dbh->prepare_cached("SELECT * FROM myindex WHERE MATCH('search terms')");
  $sth->execute();
  while (my $row = $sth->fetchrow_arrayref) {
      ... # Collect results
  }

 view all matches for this distribution


Strehler

 view release on metacpan or  search on metacpan

lib/Strehler/Manual/Installation.pod  view on Meta::CPAN

                user: myuser
                pass: mypassword
                options:
                    RaiseError: 1
                    PrintError: 1
                    mysql_enable_utf8: 1

As you can see you can directly use L<Strehler::Schema> as your B<schema_class>. This is the fastest solution and the recommended one if you won't modify the database adding tables other than the ones used by Strehler.

With the configuration of your database in the B<config.yml> you can run (from the root directory of your project):

 view all matches for this distribution


TUWF

 view release on metacpan or  search on metacpan

lib/TUWF/DB.pm  view on Meta::CPAN

    $sql = $login->($self);
    croak 'db_login subroutine did not return a DBI instance.' if !ref($sql) || !$sql->isa('DBI::db');
  } elsif(ref($login) eq 'ARRAY' && @$login == 3) {
    $sql = DBI->connect(@$login, {
      PrintError => 0, RaiseError => 1, AutoCommit => 0,
      mysql_enable_utf8 => 1, # DBD::mysql
      pg_enable_utf8    => 1, # DBD::Pg
      sqlite_unicode    => 1, # DBD::SQLite
    });
  } else {
    croak 'Invalid value for the db_login setting.';

 view all matches for this distribution


Test-mysqld-DatadirDumper

 view release on metacpan or  search on metacpan

lib/Test/mysqld/DatadirDumper.pm  view on Meta::CPAN

    my $dbh = DBI->connect($dsn, '', '', {
        RaiseError          => 1,
        PrintError          => 0,
        ShowErrorStatement  => 1,
        AutoInactiveDestroy => 1,
        mysql_enable_utf8   => 1,
    });

    my $source = do {
        local $/;
        open my $fh, '<', $self->ddl_file or die $!;

 view all matches for this distribution


Text-Tradition-Directory

 view release on metacpan or  search on metacpan

lib/Text/Tradition/Directory.pm  view on Meta::CPAN

		@column_args = ( 'columns',
			[ 'name' => { 'data_type' => 'varchar', 'is_nullable' => 1 },
			  'public' => { 'data_type' => 'bool', 'is_nullable' => 1 } ] );
		if( $dbtype eq 'mysql' && 
			exists $args->{extra_args}->{dbi_attrs} &&
			$args->{extra_args}->{dbi_attrs}->{mysql_enable_utf8} ) {
			# There is a bad interaction with MySQL in utf-8 mode.
			# Work around it here.
			# TODO fix the underlying storage problem
			$args->{extra_args}->{dbi_attrs}->{mysql_enable_utf8} = undef;
			$args->{_mysql_utf8_hack} = 1;
		}
	}
	my $ea = $args->{'extra_args'};
	if( ref( $ea ) eq 'ARRAY' ) {

 view all matches for this distribution


TreePath

 view release on metacpan or  search on metacpan

lib/TreePath/Backend/DBIx.pm  view on Meta::CPAN

          $dsn =~ m/^dbi:(\w+)/;
          $db_type = lc($1);
          my %unicode_connection_for_db = (
                'sqlite' => { sqlite_unicode    => 1 },
                'pg'     => { pg_enable_utf8    => 1 },
                'mysql'  => { mysql_enable_utf8 => 1 },

                );
          $unicode_option = $unicode_connection_for_db{$db_type};
        }
        else {

 view all matches for this distribution


UMLS-Interface

 view release on metacpan or  search on metacpan

lib/UMLS/Interface/CuiFinder.pm  view on Meta::CPAN

    }

    $errorhandler->_checkDbError($pkg, $function, $sdb);

    #  set database parameters
    $sdb->{'mysql_enable_utf8'} = 1;
    $sdb->do('SET NAMES utf8');
    $sdb->{mysql_auto_reconnect} = 1;

    $self->{'sdb'} = $sdb;

lib/UMLS/Interface/CuiFinder.pm  view on Meta::CPAN


    #  check that the db exists
    if(!$db) { $errorhandler->_error($pkg, $function, "Error with db.", 3); }

    #  set database parameters
    $db->{'mysql_enable_utf8'} = 1;
    $db->do('SET NAMES utf8');
    $db->{mysql_auto_reconnect} = 1;

    #  set the self parameters
    $self->{'db'}           = $db;

 view all matches for this distribution


Ukigumo-Server

 view release on metacpan or  search on metacpan

lib/Ukigumo/Server.pm  view on Meta::CPAN


    $self->{dbh} ||= do {
        my $conf = $self->config->{DBI} or die "Missing configuration for DBI";
        $conf->[3]->{RaiseError}        = 1;
        $conf->[3]->{sqlite_unicode}    = 1 if $self->dbdriver eq 'sqlite';
        $conf->[3]->{mysql_enable_utf8} = 1 if $self->dbdriver eq 'mysql';
        DBI->connect(@$conf) or die $DBI::errstr;
    };
}

sub db {

 view all matches for this distribution


WWW-Suffit-AuthDB

 view release on metacpan or  search on metacpan

lib/WWW/Suffit/AuthDB/Model.pm  view on Meta::CPAN

        "sqlite:///tmp/test.db?RaiseError=0&PrintError=0&sqlite_unicode=1"
    );

    # MySQL
    my $model = WWW::Suffit::AuthDB::Model->new(
        "mysql://user:pass@host/authdb?mysql_auto_reconnect=1&mysql_enable_utf8=1"
    );

    die($model->error) if $model->error;

=head1 DESCRIPTION

 view all matches for this distribution


WWW-Suffit-Server

 view release on metacpan or  search on metacpan

lib/WWW/Suffit/Server.pm  view on Meta::CPAN

=over 8

=item AuthDBURL, AuthDBURI

    AuthDBURI "mysql://user:pass@mysql.example.com/authdb \
           ?mysql_auto_reconnect=1&mysql_enable_utf8=1"
    AuthDBURI "sqlite:///var/lib/myapp/auth.db?sqlite_unicode=1"

Authorization database connect string (Data Source URI)
This directive written in the URI form

 view all matches for this distribution


Wiki-Toolkit-Store-Mediawiki

 view release on metacpan or  search on metacpan

lib/Wiki/Toolkit/Store/Mediawiki.pm  view on Meta::CPAN


# Internal method to return the data source string required by DBI.
sub _dsn {
    my ($self, $dbname, $dbhost) = @_;
    my $dsn = "dbi:mysql:$dbname";
    $dsn .= ";mysql_enable_utf8=1" if $self->{_charset}=~/^utf-?8$/i;
    $dsn .= ";host=$dbhost" if $dbhost;
    return $dsn;
}


 view all matches for this distribution


XSDSQL

 view release on metacpan or  search on metacpan

bin/xml_repo.pl  view on Meta::CPAN

		<hostname> - remote host name or ip address 
		<port> - remote host port
		<attribute> - extra attribute
		Examples: 
			sql::pg:user/pwd@mydb:127.0.0.1;RaiseError => 1,AutoCommit => 0,pg_enable_utf8 => 1
			sql::mysql:user/pwd@mydb:127.0.0.1;RaiseError => 1,AutoCommit => 0,mysql_enable_utf8 => 1
			sql::oracle:user/pwd@orcl:neutrino:1522;RaiseError => 1,AutoCommit => 0
			sql::DBM:dbm_mldbm=Storable;RaiseError => 1,f_dir=> q(/tmp)
	-t <c|r> - issue a commit or rollback at the end  (default commit)
	-i ignore errors (return 0 if exists errors)
)

 view all matches for this distribution


( run in 0.650 second using v1.01-cache-2.11-cpan-00829025b61 )