Methods for using Netbeans to operate MySQL databases (2) [group chart] TIP: We often use databases during development to perform various operations on databases, thanks to the support of various mainstream databases in the integrated development environment of Netbeans, our developers can easily use Netbeans for project development, saving a lot of time and bringing convenience. First, make sure that netbeans and mysql are installed on the computer. I am using netbeans6.5 and mysql5.
In this new dialog box select add button, select the driver you want to add (mysql database driver mysql-connector-java-3.1.3-beta-bin.jar), after adding OK netbeans will automatically fill in Drivers Class :( com. mysql. jdbc. driver) and Name text input box, and then click OK to complete the configuration of the database Driver on netbeans.
2. connect to the mysql database through netbeans
After all the above work is done, we can use netbeans as the mysql client to operate the mysql database. Right-click the database node and choose new connection... "(create a connection)" option, the following interface is displayed, where name (name) is the name of the database driver configured above, host (host) is the computer name or IP address of the mysql database, port is the port number of mysql. the default value is 3306. database is the name of the database to be connected (for example, yang is the database created by myself), and then enter the username and password of the database, click OK. For details, refer:
After that, an additional database we just added will be added under the databases node, right-click it, and select connect ), the mysql database to be connected will be opened. For example: