Thanks for the info Chris. I know it wasn't specifically a TC question. But I started having db connection problems after moving to TC 8 (see my latest post...) and I was just kinda grasping at straws thinking it might have had something to do with a back level jdbc driver. It appears the problem is not driver related. But it's still nice to have a definitive answer about the driver.

Jerry

On 7/28/2015 11:07 PM, Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jerry,

On 7/28/15 6:44 PM, Jerry Malcolm wrote:
I have been using Tomcat and mySQL for many years in a few
different environments.  Some of the configurations are using
org.gjt.mm.mysql.Driver and some are using com.mysql.jdbc.Driver.
I could even attempt to tell you the history of why I have one
driver in some situations and the other driver in other situations.
They both appear to be working.  However, it would seem to me that
one is probably newer and/or preferred over the other.  I would
like to settle on one driver throughout all environments.

Can someone tell me what the 'right' driver to be using with TC 8
and a fairly recent version of mySQL?  If there are reasons why I
should use one in certain situations and the other one in other
situations, please explain the criteria.
This isn't really a Tomcat question, but I happen to know the answer.

You should be using Oracle/MySQL Connector/J. The current version is
5.1.36, and you can use either class name shown above to configure it.

The org.gjt.mm.mysql.Driver class exists for backward-compatibility.
You should be using com.mysql.jdbc.Driver for your driver's class name.

There is no reason to use the older driver class name, and there is no
good reason to use an older version of Connector/J unless something is
actually broken in a later version. (I have my own complaints about a
particular version and later having to do with ClassLoader pinning,
but the driver doesn't have any broken features AFAICT.)

Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVuFF7AAoJEBzwKT+lPKRYqLQP/iRbZj4agUpKohJXeyCmuk8j
B6Zfg0GSpOdm4V7VaLHL98c/T+L5d/CmbetBI+FRG9A6D9Zqoxy4PbK6hOcNCUHA
5n9fIahZ3cb0iBxNlGAZ76pEBGya0lbVvhOdAsnotU5VDlM913o6R5d5jA9WpeCH
NyB8pbuBvN7ebes/PMrFCQzAm13UJaj6XaebDuVXAs3ZmILO8blvRPfSKLfzavZh
BLvbQ0EvbcizSSa2fw4GhrlXSF9VcqpEjGwPjujDWZQBAKddp9XGdbK9Tr0GYLyj
/Yw7/yis7/HFt0kbsP84cAH+kaFBHkR06695wSVx7JLgFrxZIu4f2A8jEQ4PFZX1
zMNlB35YRiJEhTjcalIbfp4o87XfqKUV/DS1YnhxRDJjP8JnVASM9Gtdz6jpjE43
oa70lOl85l4lHy7FefZeXTVG6BW/7V35QaO6vav6h52Jip/Rlnm+NjCrlul98m1T
rGWrzDdq40GP90sN+r3KuEhQH/E4v762gZ5Yd1/0qu56lJiFMa/wJLRC8B9FfVGe
isb0piddnOFljHcHjSZNJFWXnG1iodR7YFO8273IDd6KnVgD/lC7pHDroQh/W8N/
sdk/ZwDDThijwFVn7jK8rFZRR+pbBNku1Ll0x5rCc5l5nKyC1hyHdP2p8tQlsj06
ri/OSEipnVJwJFxaArNZ
=K3Tj
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.6081 / Virus Database: 4392/10325 - Release Date: 07/28/15


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to