Cheap UK Web Hosting Company, Cheap Web Hosting UK, Low Cost Webhosting Space, Low Cost Web Site Hosting UK, Domain Hosting UK and Domain Name Registration

Cheap web hosting uk and domain name registration services from Webconexion Internet Solutions LTD
Tel: 0208 144 2211      Fax: 0871 661 9456      Email: sales@webconexion.net

  Connecting to MySQL using JSP and JDBC


 
 

This section shows you how to create a MySQL database by using Webconexion's Asparagus hosting control panel and how to connect to it using JSP JDBC.

Step 1 - Creating a MySQL database

Log into the Asparagus hosting control panel via the members area, select "Web Tools" then "MySQL Databases". Enter a database username and password of your choice, the database name will be your username with "db" appended to it, so if you created a database called "amazon" your database name would be "amazondb".

Step 2 - Connecting to MySQL using JSP and JDBC

Once you've successfully created your database can you connect to it using JSP via JDBC using the following connection example. Change the connection parameters in red to the ones you've chosen in Step 1.

<%@ page import="java.sql.*"%>
<html>
<head>
<title>JDBC Connection example</title>
</head>

<body>
<h1>JDBC Connection example</h1>

<%

java.sql.Connection cn;
Class.forName("org.gjt.mm.mysql.Driver");
cn = DriverManager.getConnection("jdbc:mysql://localhost:3306/database_name", "database_username", "database_password");

%>

</body>
</html>

If you have a question that you cannot find the answer to here, please email support@webconexion.net

Technical Support

 
Get online now with your choice of UK or International domain name.

 UK domains £3.25 p/a
 International domains £10 p/a
 Web forwarding services
 E-mail forwarding services
 POP/IMAP E-Mail accounts NEW
 Spam E-Mail Protection NEW
 DNS Configuration NEW
 Change nameservers
 Upgrade to web hosting
 No release fees

The domain control panel (DCP) is provided as standard with all parked domain accounts.

 Map multiple domains to your web hosting account for the one time fee of £29.99 per domain!

 Additional bandwidth usage on your web hosting account now only 2p per MB per month!

 HTML only web hosting accounts now start from just £29.99 p/a!

 Add Frontpage Extensions to your HTML only web hosting account for the one time fee of £14.99.

 Transfer your .co.uk domain name to Webconexion for FREE with the option to upgrade to one of our web hosting accounts!

Latest News | Related News | Contact Us | Terms & Conditions | Knowledgebase | Related Resources | System Status | Add Resource
Copyright © 2008 - Webconexion Internet Solutions LTD