Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MySQL Tech Tour 2015 - 5.7 Connector/J/Net

519 views

Published on

MySQL Tech Tour 2015 - 5.7 Connector/J/Net

Published in: Technology
  • Be the first to comment

  • Be the first to like this

MySQL Tech Tour 2015 - 5.7 Connector/J/Net

  1. 1. 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.
  2. 2. 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.
  3. 3. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Agenda 1 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
  4. 4. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Agenda 1 What Is a MySQL Connector? 4
  5. 5. 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/ODBC Standardized database driver for Windows, Linux, Mac OS X, and Unix platforms. Connector/Net Standardized database driver for .NET platforms and development. Connector/J Standardized database driver for Java platforms and development. Connector/Python Standardized 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 - mysqlnd The 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.
  6. 6. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Agenda 2 What is Connector/Net + Connector/J 6
  7. 7. 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
  8. 8. 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.
  9. 9. 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
  10. 10. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Agenda 3 Connector/Net – What’s new? 10
  11. 11. 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
  12. 12. 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.
  13. 13. 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.
  14. 14. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Agenda 4 Connector/Net – Feature Highlights + Security 14
  15. 15. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Table Caching Overview • 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
  16. 16. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Table Caching How 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);
  17. 17. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Windows Authentication Features 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
  18. 18. 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.
  19. 19. 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…
  20. 20. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Agenda 5 Connector/J – What’s new? 20
  21. 21. 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
  22. 22. 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.
  23. 23. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Agenda Connector/J - Feature Highlights + Security 23 6
  24. 24. 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
  25. 25. 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
  26. 26. 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’
  27. 27. 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
  28. 28. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SSL switches available: • useSSL • requireSSL • verifyServerCertificate • clientCertificateKeyStoreUrl • clientCertificateKeyStoreType • clientCertificateKeyStorePassword • trustCertificateKeyStoreUrl • trustCertificateKeyStoreType • trustCertificateKeyStorePassword • enabledSSLCipherSuites
  29. 29. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Agenda Summary 29 7
  30. 30. 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 Guide http://dev.mysql.com/doc/connector-j/en/ Todd Farmer’s Blog http://mysqlblog.fivefarmers.com/ Connectors Team Blog http://insidemysql.com/category/mysql-development/connectors/ Summary

×