One approach is to upgrade to NetBeans 6.1. NetBeans 6.1 has new MySQL support, including the ability to easily create the NetBeans sample databases, including travel.
- If you do not see a MySQL Server node under the Databases folder on the Services tab, right click on Databases and choose Register MySQL Server. Fill in the information for how to connect to the server. Now you should see a node, and if you entered the connection information correctly, it should be connected.
- Right click the MySQL Server node and choose "Create Database..."
- From the drop-down pick 'travel' and press "OK
- NetBeans will create the database, create a connection for the database (you may need to enter the password) and then load the travel database tables.
Instructions for NetBeans 6.0
The Travel database is used in several tutorials that demonstrate Visual Web functionality. This database is bundled with the full installation of NetBeans IDE 6.0 for use with Java DB and the GlassFish application server. To make the Travel database available to the IDE:
- Download the create-travel-derby.sql script from the NetBeans Documents and Files page and unzip it to a local directory.
- If you have not already done so, install and configure the MySQL database server.
- Register the database server with your application server.
- In MySQL, create a database instance called Travel.
- In the IDE, connect to the Travel database in the Services window. For more information, see the tutorial Connecting to a MySQL Database in NetBeans IDE.
- Right-click the node for the connection and choose Execute Command to open the SQL Command query editor.
- In the main menu, choose File > Open File.
- Browse to and select create-Travel-derby.sql, then click Open.
- In the Connection drop down list, select the MySQL Travel database you created in step 4.
- Click Run SQL
in the editing toolbar to create and populate the tables in the Travel database.
- In the Services window, expand the node for the travel database connection to view the tables.