JSP connection MySQL----------first technical article

Source: Internet
Author: User
Tags stmt

Do homework today even a day of MySQL.

Finally I learned from the bitter, decided to start learning JSP from 0. The province is facing a situation that is not.

Busy all night. Eventually the database was connected, just. I'm so sad, I can't even ink a database.

<%@ page language= "java" import= "java.util.*" pageencoding= "Utf-8"%><% @page import= "Data.database"%> <% @page import= "java.sql.*"%><%string path = Request.getcontextpath (); String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";%> <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >

Included: Configuration of My.ini in MySQL

[mysqld]# set Basedir to installation path, e.g., C:/mysql # Set the installation folder for MySQL basedir=f:/datebase/mysql# set DataDir to Loca tion of data directory, # e.g., C:/mysql/data, or D:/mydata/data # set to MySQL file folder Datadir=f:/datebase/mysql/data[winmysqla Dmin]server=f:/datebase/mysql/mysqld-nt.exe#user=root #password =root# above is the configuration of Setup Winmysqladmin # Default-storage-engine=myisam


JSP connection MySQL----------first technical article

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.