If the config.properties from SQL Server to the MYSQL,SRC directory needs to be changed multiple places:
First, user name and password, note the user name and password do not add single quotation marks
Second, the database of the driver must be changed back
#DataBase_Driver =com.microsoft.sqlserver.jdbc.sqlserverdriver
Database_driver=com.mysql.jdbc.driver
Third, the constant file under the common package, the penultimate line, the relevant SQL Server to be changed to MySQL
URL = "jdbc:mysql://" + Database_add + ": 3306/" + database_name + "? relaxautocommit=true&zerodatetimebehavior= Converttonull ";
Four, the corresponding Lib class library first test to Web-info re-introduced, SERVLET-API to be introduced separately
When you change to MySQL, Mysql-connector-java-5.1.15-bin.jar This package don't forget to introduce
Vi. index.jsp as Welcome interface
Seven, a new servlet will be automatically registered under Web-info, do not create a new javafile. Note Create a new StartServer file under the servlet and set the priority to 1
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Tomcat Link Database