Showing entries 1 to 7
Displaying posts with tag: driver (reset)
MySQL JDBC Statement Caching

Introduction In this article, we are going to see how we can enable the MySQL JDBC Driver Statement Caching mechanism, which, unfortunately, is not enabled by default. No matter what data access framework you are using, you still need to configure the JDBC Driver if you want to get the most out of the MySQL database engine. MySQL JDBC client-side PreparedStatement As I explained in this article, by default, the MySQL JDBC Driver emulates prepared statements. So, no matter if you are executing a plain Statement or a PreparedStatement, the SQL statement... Read More

The post MySQL JDBC Statement Caching appeared first on Vlad Mihalcea.

JDBC Driver Maven dependency list

Introduction Ever wanted to connect to a relational database using Java and didn’t know which JDBC Driver Maven dependency to use? If so, this article is surely going to help you from now on. Oracle Since September 2019, the Oracle JDBC Driver is available on Maven Central. For JDK 10 and 11, use the following Maven dependency: For JDK 8, use the ojdbc8 artifact instead: For more details about the proper version to use, check out the following Maven Central link. MySQL The MySQL Driver is available on Maven Central, so just... Read More

The post JDBC Driver Maven dependency list appeared first on Vlad Mihalcea.

JDBC Driver Connection URL strings

Introduction Ever wanted to connect to a relational database using Java and didn’t know the URL connection string? Then, this article is surely going to help you from now on. Oracle The JDBC connection properties look as follows: JDBC Driver oracle.jdbc.OracleDriver JDBC Url jdbc:oracle:thin:@localhost:1521/orclpdb1 Hibernate Dialect org.hibernate.dialect.Oracle12cDialect And, if you want to connect using a … Continue reading JDBC Driver Connection URL strings →

The post JDBC Driver Connection URL strings appeared first on Vlad Mihalcea.

Some sharding support and cache locality optimization support for PHP MySQL driver

It is time for christmas presents: some sharding support and cache locality optimizations are coming with PECL/mysqlnd_ms 1.5. PECL/mysqlnd_ms is a plugin for the mysqlnd library. The plugin adds replication and load balancing support to any PHP MySQL API (mysql, mysqli, PDO_MySQL) if compiled to use the mysqlnd library.

As a MySQL user you can choose between a wide variety of clustering solutions to scale-out. Your options range from eventual consistent solutions to strong consistent ones, from built-in (MySQL Replication, MySQL Cluster) to third party or home-grown. PECL/mysqlnd_ms is a client side load balancer that aims to serve all. …

[Read more]
Demonstrating the Features of MySQL Native Driver for PHP, mysqlnd

Support for Persistent Connections

ext/mysqli does not support persistent connections when built with libmysql. However ext/mysqli does support persistent connections when built with mysqlnd. To establish a persistent connection with the MySQL server using ext/mysqli and mysqlnd, prepend the database host with the string "p:" (p stands for persistent) as shown below.


$host="p:localhost";
$port=3306;
$socket="/tmp/mysql.sock";
$user="root";
$password="admin";
$dbname="test";

$cxn = new mysqli($host, $user, $password, $dbname, $port, $socket)
        or die ('Could not connect to the database server' . mysqli_connect_error());

ext/mysql, ext/mysqli and PDO_MySQL support persistent connections when built with mysqlnd.

The new API call mysqli_fetch_all()

mysqlnd extends the ext/mysqli API with one brand new method, …

[Read more]
Demonstrating the Features of MySQL Native Driver for PHP, mysqlnd

Support for Persistent Connections

ext/mysqli does not support persistent connections when built with libmysql. However ext/mysqli does support persistent connections when built with mysqlnd. To establish a persistent connection with the MySQL server using ext/mysqli and mysqlnd, prepend the database host with the string "p:" (p stands for persistent) as shown below.


$host="p:localhost";
$port=3306;
$socket="/tmp/mysql.sock";
$user="root";
$password="admin";
$dbname="test";

$cxn = new mysqli($host, $user, $password, $dbname, $port, $socket)
        or die ('Could not connect to the database server' . mysqli_connect_error());

ext/mysql, ext/mysqli and PDO_MySQL support persistent connections when built with mysqlnd.

The new API call mysqli_fetch_all()

mysqlnd extends the ext/mysqli API with one brand new method, …

[Read more]
Demonstrating the Features of MySQL Native Driver for PHP, mysqlnd

Support for Persistent Connections

ext/mysqli does not support persistent connections when built with libmysql. However ext/mysqli does support persistent connections when built with mysqlnd. To establish a persistent connection with the MySQL server using ext/mysqli and mysqlnd, prepend the database host with the string "p:" (p stands for persistent) as shown below.


$host="p:localhost";
$port=3306;
$socket="/tmp/mysql.sock";
$user="root";
$password="admin";
$dbname="test";

$cxn = new mysqli($host, $user, $password, $dbname, $port, $socket)
        or die ('Could not connect to the database server' . mysqli_connect_error());

ext/mysql, ext/mysqli and PDO_MySQL support persistent connections when built with mysqlnd.

The new API call mysqli_fetch_all()

mysqlnd extends the ext/mysqli API with one brand new method, …

[Read more]
Showing entries 1 to 7