Search WebSpherePower's 6,962 WebSphere, Java, and Eclipse article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
DATABASE CONNECTIVITY
Easily connecting to MySQL databases from WebSphere Studio
By Dan Velasco

Connecting to databases from within WebSphere Studio is surprisingly easy. As an example, I'll show you how you can quickly connect to a MySQL database. Note that there are many other database types that you can connect to using WebSphere Studio, including DB2, Informix, Microsoft SQL and Oracle. I'm going to focus on MySQL here since it's a great, free open-source choice. Note: Cloudscape is free as well, but it is limited to a single concurrent connection.

If you don't yet have or have not used MySQL, take a look at the bonus tip at the end of this article for links to help you get started.

Once you have a MySQL server up and running, either on your local computer or on a server, you just need to do to create a connection to a MySQL database within WebSphere Studio. Here's how.

Open the Data perspective
Open the Data perspective if it is not already open. You can open the Data perspective using one of the following techniques:

  • Choose Window --> Open Perspective --> Data, or
  • Click on the Open Perspective toolbar button and select Data.

If you don't see the Data perspective on the list, choose Other to find it.

Create a new connection
Right click on a blank part of the DB Servers view on the bottom-left and choose New Connection. The New Connection dialog box will appear as shown in Figure A.

FIGURE A


Establish a data connection to the MySQL database Roll over picture for a larger image.

Specify connection details
In the Database Connection dialog, give the connection a name and fill out the database, user ID and password information. Select "MySQL, V3.23" as the Database vendor type. For the driver type, you can choose either MM.MySQL JDBC APP DRIVER if your MySQL server is local to your computer or MM.MySQL JDBC NET DRIVER if the database is on another server. Click Finish when done.

View the database structure
If the connection was successful, you'll be able now to view the structure of your database in the DB Servers window. To see sample data from the database, right click on the name of a table and choose Sample contents. To close or re-open the database connection, right click on the connection name and choose either Disconnect or Reconnect.

Quick tips
That's it, you've now created a database connection that you can use to examine the structure/content of a MySQL database. Here are two other quick tips.

To actually change the structure of the database, you'll need to use the Import to Folder feature. Simply right click on the connection, database or table name in the DB Servers view and choose Import to Folder as shown in Figure B. Choose a name for the Folder and click Finish. For more information about how to use this feature, check the WebSphere Studio Help.


1  ·  2  ·  3  ·  Next »
Other articles you might like
Home > WebSphere Studio (9 articles)
   Setting up a Wiki in WebSphere Studio Application Developer
   Upgrading WebSphere Studio to Version 5.1.2
   Managing multiple workspaces with WebSphere Studio
Home > Database Integration (3 articles)
   Locate your JDBC DataSource in WebSphere Application Server using JNDI
   Creating a MySQL data source using WebSphere Application Server
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent WebSpherePower Articles
A perfect 10: celebrating 10 years online
You can help bring security and safety back to White House email
Introducing the WebSpherePower RSS feeds
From New Jersey to Palm Bay, Florida
A WebSphere pot o' gold
How Elvis entered the building and CES went out the window
WebSphere Application Server 6: what's it all mean?
WebSpherePower News
Excitement brewing for JavaOne 2010, with or without Google
Large companies ignore data centre advice
Onapsis to Release ERP Vulnerability Testing Suite
Botnet Takedown May Yield Valuable Data
VMware app dev platform gazes beyond SpringSource Java
IBM Claims World's Fastest Chip
'Free Java': InfoWorld's guide to the protest goodies
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Smartphone smarts for a mobile world
David Gewirtz Online: CNN commentary and analysis
DominoPower: It's time for Lotus to double-down on Linux and open source
OutlookPower: The strange case of Outlook losing notes and requiring passwords
-- Advertisement --

How To Save Jobs
This book is about how to create and save jobs. Believe it or not, there's not a single book out there that specifically focuses on job creation and preservation -- until now.

This book, by ZATZ editor-in-chief David Gewirtz, is about helping your business work better. It's about helping you change the things you need to change so your company can perform more effectively.

Plus, through a grant from ZATZ, it's a free download.

Read it and reap.

-- Advertisement --

Influencer. Recommender. Decision Maker.
They all read WebSpherePower Magazine. They all rely on WebSpherePower Magazine.

If you want to reach the inner-circle of IBM IT professionals, you won't find a better resource than WebSpherePower Magazine.

Click for our Media Kit

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login