Home >Database >Mysql Tutorial >通过JDBC链接Mysql数据库_MySQL

通过JDBC链接Mysql数据库_MySQL

WBOY
WBOYOriginal
2016-06-01 13:07:54974browse

1、创建动态Web项目,将Mysql数据库的驱动包mysql-connector-java-5.1.25-bin.jar

添加至项目的构建路径中,放在WEB-INF->lib下


2、创建程序中的主页index.jsp

在其中加载数据库驱动并创建数据库链接

<meta http-equiv="Content-Type" content="text/html; charset=GB18030"><title>杩炴帴MySQL鏁版嵁搴</title>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn