+ All Categories
Home > Technology > MySQL Tech Tour 2015 - 5.7 Connector/J/Net

MySQL Tech Tour 2015 - 5.7 Connector/J/Net

Date post: 22-Jan-2018
Category:
Upload: mark-swarbrick
View: 461 times
Download: 1 times
Share this document with a friend
31
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | MySQL Tech Tour What's New In Connector/Net + Connector/J Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Transcript

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

MySQL Tech TourWhat's New In Connector/Net+ Connector/J

Copyright © 2015, Oracle and/or its affiliates. All rights reserved.

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Safe Harbor Statement

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Agenda1

2

3

4

5

What Is a MySQL Connector?

What is Connector/Net / Connector/J

Connector/Net – What’s new?

Connector/Net – Feature Highlights + Security

Connector/J – What’s new?

Connector/J - Feature Highlights + Security

Summary

3

6

7

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Agenda1 What Is a MySQL Connector?

4

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

What is a MySQL Connector?

MySQL offers standard database driver connectivity for using MySQL with applications and tools that are compatible with industry standards ODBC and JDBC. Any system that works with ODBC or JDBC can use MySQL.

Connector/ODBCStandardized database driver for Windows, Linux, Mac OS X, and Unix platforms.Connector/NetStandardized database driver for .NET platforms and development.Connector/JStandardized database driver for Java platforms and development.Connector/PythonStandardized database driver for Python platforms and development.Connector/C++Standardized database driver for C++ development.Connector/C (libmysqlclient)A client library for C development.MySQL native driver for PHP - mysqlndThe MySQL native driver for PHP is an additional, alternative way to connect from PHP 5.3 or newer to the MySQL Server 4.1 or newer.

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Agenda2 What is Connector/Net + Connector/J

6

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

What Is Connector/Net

• Core ADO.Net compatible data provider• Connection pooling• SSL and Windows authentication support• Mono compatible*

• Entity Framework provider• ASP.Net web providers• Membership, role, profile, session providers

• Visual Studio Integration• Visual Studio 2005, 2008, & 2010• Intellisense and syntax coloring

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

What is MySQL Connector/J?

• Pure Java/JDBC client for MySQL• Not dependant on any C/C++ libraries like many early JDBC drivers did. Pretty

much expected nowadays.• Supports advanced SSL, load-balancing, plug-ins• Various configuration options for SSL including client-side authorization (to the

server), cipher suite selection, etc. SSL is becoming more important and we should have even more stuff coming. Support for the latest JDK security features.• Support for scaling and HA config including load-balancing, replication, failover

and Fabric.

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

What is MySQL Connector/J?

• Highly configurable performance tuning and behavioral options• You can look at the docs for a complete list:

http://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html • Lots of low-level performance tuning options, behavioral options for app-

specific convenience or certain app servers/frameworks. Lots of stuff to support many different environments and new stuff being added constantly.• Fits in any application being embeddable to large-scale app servers like

WebLogic & JBoss

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Agenda3 Connector/Net – What’s new?

10

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 11

Latest releases

• MySQL Connector/Net 6.7.9, 6.8.7, 6.9.8

• Supports for .NET 3.5 – 4.5

• Available for download at dev.mysql.com

• MySQL server support starting with 5.1 to 5.7.9 versions.

• Support for Entity Framework versions

• MySQL Fabric support

• Replication with MySQL server

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 12

Replication and Load Balancing support• Allows to connect to master/slaves environments • Load balancing requests over all the available servers.• Read-only queries use a load balancing behavior.• DML queries (insert, update, delete, etc.) are sent to the master server.• Round Robin distribution is used in Connector/NET for Load Balancing.• Failover support: Connector/NET monitors connections to the servers, redirecting load to available servers on each request. When a server is back online is marked available again.

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 13

Security guidelines

• SSL usage is enforced when Connector/net is used with MySQL Server 5.7.9

• SSL is the default with MySQL 5.7.9.

• Support for pem certificates on Windows.

• Supports Integrated Security on Windows with MySQL Enterprise.

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Agenda4 Connector/Net – Feature Highlights + Security

14

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Table CachingOverview

• Supports TableDirect command types only• Does not cause a round trip to the server• Will be extensible in the future– Think about memached/velocity

• Is enabled at the command level• Does not work with SequentialAccess• XXXX% faster than straight queries

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Table CachingHow do I use it?

It's really easy to use it in a reader

MySqlCommand cmd = new MySqlCommand(“zipcodes”, connection);

cmd.EnableCaching = true;

cmd.ExecuteReader();

Or use that command in a data adapter

MySqlDataAdapter da = new MySqlDataAdapter();

da.SelectCommand = cmd;

da.Fill(dt);

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Windows AuthenticationFeatures and requirements

• Supports local and domain authentication• Requires MySQL Server 5.5 or higher (commercial)• Supports the Integrated Security keyword• Server supports user mapping• User/groups• Supports proxies

• This is NOT a full tutorial on pluggable authentication!• Client side plugin shipped with server is not used.• Please see http://dev.mysql.com/doc/refman/5.5/en/windows-

authentication-plugin.html

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Milliseconds support

• MySQL Server 5.6.4 and up introduced Fractional Seconds support in DateTime, Time and TimeStamp type columns with up to 6 precision digits.

• Connector/Net can manage up to 6 also when using MySqlDateTime types to read/write values for columns of the previous mentioned types.

• This support doesn’t affect the current behavior when using DateTime, Time and TimeStamp with Connector/Net and any other MySQL server version.

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

• In the previous code If the connection string used after the security definition does not match all the requirements, the attempt to do the connection will throw a SecurityException before even attempting the connection to the specified database.

• The MySqlClientPermission instance can have multiple connections and any call to MySqlConnection.Open will not succeed if the connection string fails at any of the specified parameters or values.

Partial Trust Support…

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Agenda5 Connector/J – What’s new?

20

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Latest developments in MySQL Connector/J

• Support for JDBC 4.2 spec• Support the new date/time types in Java 8. This is a "nice to have" feature for

many.• Support for MySQL Fabric• Notes: We support all Fabric features including authentication, HA & sharding.• Ongoing TLS/security enhancements with better default security for MySQL

5.7

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Latest developments in MySQL Connector/J

SSL used by default when connecting to Enterprise 5.7 servers which auto-generate SSL key pairs. The server has recently raised some of their hard-coded security minimums and we are fully supporting these too.

Support for SHA-256 authentication vs SSL/TLS or RSA encrypted passwords.

Performance improvements including community contributions.

We've made a number of small but appreciated performance improvements found by community members. We've also accepted a few small patches for performance improvements from community members.

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

AgendaConnector/J - Feature Highlights + Security

23

6

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

• Multi-host connections• MySQL Fabric• Fabric use cases range from basic HA (master/slave) setups for improved

manageability to large-scale setups with sharding over many master/slave clusters. Fabric is releasing multi-node support at OOW which addresses the SPOF factor. C/J has great support for Fabric.

• Load-balancing / Replication• Provision of JMX (built-in Java management console) access to connection

pools allowing to perform failover and add/remove slaves at runtime.• Replication support also supports the new multi-master configuration

required for group replication.

Connector/J - Feature Highlights + Security

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

• MySQL Community built with yaSSL

• MySQL Enterprise built with OpenSSL

• MySQL 5.7 includes SSL improvements– Automatic SSL configuration with OpenSSL

• Previous versions require manual configuration– Increased requirements for Diffie-Hellman key exchange

• Key size minimum increased from 512 to 2048– Command line client requires SSL when --ssl is given– New mysql_ssl_rsa_setup utility

• Requires OpenSSL to be installed

• TLS 1.0

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

• Any user can connect with SSL

• MySQL 5.7 moves REQUIRE SSL et al to CREATE USER and ALTER USER statements– Previously included with GRANT

• Users created with REQUIRE SSL will be denied access when connecting without SSL

• Additional constraints available– REQUIRE X509– AND ISSUER ‘issuer’– AND SUBJECT ‘subject’– AND CIPHER ‘cipher’

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

• Encrypted communications

• Establish identity of server

• Allow server to establish identity of client

• Required for regulatory and corporate policy compliance

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

SSL switches available:

• useSSL

• requireSSL

• verifyServerCertificate

• clientCertificateKeyStoreUrl

• clientCertificateKeyStoreType

• clientCertificateKeyStorePassword

• trustCertificateKeyStoreUrl

• trustCertificateKeyStoreType

• trustCertificateKeyStorePassword

• enabledSSLCipherSuites

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

AgendaSummary

29

7

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

MySQL can handle multiple development languages with our full connector support.

Further reading here: https://www.mysql.com/products/connector/

Check out the revamped MySQL Documentation! http://dev.mysql.com/

MySQL Forums :: Connector/JDBC and Java http://forums.mysql.com/list.php?39

MySQL Connector/J Developer Guidehttp://dev.mysql.com/doc/connector-j/en/

Todd Farmer’s Bloghttp://mysqlblog.fivefarmers.com/

Connectors Team Bloghttp://insidemysql.com/category/mysql-development/connectors/

Summary


Recommended