Tomcat + mysql database connection pool configuration

xiaoxiao2021-03-06  16

1) Download mm.mysql-2.0.14-bin.jar package, put it in a CommON / lib folder under Tomcat directory 2) Join before in the CONF / Server.xml in the Tomcat directory (note : All uppercase places to replace your own things) factory org.apache.commons.dbcp.basicDataSourceFactory driverclassname org.gjt.mm.mysql.driver <-! The JDBC connection url for connecting to your MySQL dB The autoReconnect = true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection mysqld by default closes idle.. CONNECTIONS AFTER 8 Hours. ->

URL jdbc: mysql: // localhost: 3306 / database_name? AutoreConnect = true Username db_username password db_password maxactive 100 Maxidle 30 <

转载请注明原文地址:https://www.9cbs.com/read-42222.html

New Post(0)