Search WebSpherePower's 6,475 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
Oracle releases emergency patch
China shuts down training website for hackers
Ruby on Rails 3.0 Beta Released
US scientists get free cloud on-ramp
Oracle upgrades Eclipse free plug-in package
Can you trust Chinese computer equipment?
Big Blue demos 100GHz chip
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad: Apple's latest heartbreaker
David Gewirtz Online: CNN commentary and analysis
DominoPower: Lotusphere 2010: mobility and collaboration
OutlookPower: Running auto-respond rules when Outlook is closed
-- Advertisement --

EASY DEDICATED AND VIRTUAL DEDICATED SERVERS FOR AS LOW AS $67.99 PER MONTH
Customize and configure your own dedicated server. Simply choose one of our popular plans or select your own Linux or Windows server and plan options.

NO LONG WAITS. Server provisioned within hours.

Tap here now and be up and running with your own server tonight.

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