Pretend your friend is a Java programmer who uses Netbeans. Explain to them how to connect a MySQL database to Java using Netbeans. What should they do?Be methodical with the steps.
First, I would advise them to install MySQL as without it you can not connect a non-existant databse to Netbeans. Once MySQL is properly installed, create a databse within MySqy to use with Netbeans. Once the database is created, open Netbeans and create a New Project. In categories, choose Java . In projects, choose desktop application and click Next.
Type in the name you want for this project and then select Database Application under the Choose Application Shell heading and click Next. Click the dropdown menu database connection and choose New Database Connection. A new window will open. In the Name drop down field, choose MySQL (Connector/J driver). In the Database URL field, type in jdbc:mysql://localhostport number/databaseName. In the User Name field type root and in the password field type in the password you created when you installed MySQL, then hit ok. Then click next. Then click finish and you're application is ready to begin.
Wednesday, July 9, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment