FaqDatabaseConnectivityTravelDb

How do I enable the sample databases for MySQL in NetBeans IDE 6.0?

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.

  1. 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.
  2. Right click the MySQL Server node and choose "Create Database..."
  3. From the drop-down pick 'travel' and press "OK
  4. NetBeans will create the database, create a connection for the database (you may need to enter the password) and then load the database tables and initial data.

Note that we also provide support for creating the MySQL Sakila sample database. This is provided as a plugin. Go to Tools->Plugins, search for "sakila", and then install the Sakila plugin. Now 'sakila' will be available as a sample database from the drop-down specified in the instructions above.


Instructions for NetBeans 6.0

  1. Download the create-sample_FaqDatabaseConnectivityTravelDb.sql, create-travel_FaqDatabaseConnectivityTravelDb.sql, or create-vir_FaqDatabaseConnectivityTravelDb.sql scripts that are attached to this FAQ
  2. If you have not already done so, install and configure the MySQL database server.
  3. In MySQL, create a database instance called sample, travel, or vir.
  4. In the IDE, connect to the database in the Services window. For more information, see the tutorial Connecting to a MySQL Database in NetBeans IDE.
  5. Right-click the node for the connection and choose Execute Command to open the SQL Command query editor.
  6. In the main menu, choose File > Open File.
  7. Browse to and select the sql script you want to use.
  8. In the Connection drop down list, select the connection you created in step 4.
  9. Click Run SQL http://www.netbeans.org/images/articles/mySQL/run-sql-button.png in the editing toolbar to create and populate the tables in the Travel database.
  10. In the Services window, expand the node for the travel database connection to view the tables.
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo