Post on 09-Apr-2018
8/8/2019 Select MySQL
http://slidepdf.com/reader/full/select-mysql 1/13
Select MySQL as Connection Profile Type. Name the Connection Profile for the
host and database to which you're connecting (i.e. localhost.database). We are giving
name MyMySQLConnection. Click Next >.
8/8/2019 Select MySQL
http://slidepdf.com/reader/full/select-mysql 2/13
Click New Driver Definition button which will open new dialog box. Select Name -
MySQL JDBC Driver and System Version - 5.1
8/8/2019 Select MySQL
http://slidepdf.com/reader/full/select-mysql 3/13
Eclipse will give error as "Unable to locate JAR/Zip in the file system.".
Select Jar List TAB. Click Add JAR/Zip... button and select mysql-connector-
java-5.1.8-bin.jar . Press OK .
8/8/2019 Select MySQL
http://slidepdf.com/reader/full/select-mysql 4/13
On theG
eneral TAB, update following fields and select Save password checkbox.
y Database: mysql
y URL: jdbc:mysql://localhost:3306/mysql
y User name: root
y Password: password
8/8/2019 Select MySQL
http://slidepdf.com/reader/full/select-mysql 5/13
Click Test Connection to check connection has been successfully establish. Click
Finish
8/8/2019 Select MySQL
http://slidepdf.com/reader/full/select-mysql 6/13
Back to the top
Open Database Development Perspective
With a connection template and profile defined, open up the DatabaseDevelopment
Perspective, if it isn't already open.
Select Window > Open Perspective > Other.... Select Database Development,
click OK .
8/8/2019 Select MySQL
http://slidepdf.com/reader/full/select-mysql 7/13
Back to the top
Connecting to MySQL Database
8/8/2019 Select MySQL
http://slidepdf.com/reader/full/select-mysql 9/13
Name the project MyFirstSQLProject. Click Finish.
8/8/2019 Select MySQL
http://slidepdf.com/reader/full/select-mysql 10/13
Give File name as MyFirstSQL.sql. Select database server type as MySql_5.1.Select connection profile name as MyMySQLConnection. Select database name as
test. Click Finish.
8/8/2019 Select MySQL
http://slidepdf.com/reader/full/select-mysql 11/13
NOTE: MySQL by default has three databases when you install it.information_schema, mysql, and test
Type in the SQL you'd like to run. Select all, or a portion, of the SQL to run. R ight-
click in the document tab and select either Execute All, Execute Selected Text, or
Execute Selected Text As One Statement. R eview the SQL R esults at the bottom
8/8/2019 Select MySQL
http://slidepdf.com/reader/full/select-mysql 12/13
of the SQL Development Perspective.
R ight-click on a table and select Data > Edit. An editor tab appears with the table's
columns, enter one or many records into the rows provided. R ight-click anywhere inthe editor panel and select Save.
8/8/2019 Select MySQL
http://slidepdf.com/reader/full/select-mysql 13/13
If your SQL statement executes successfully, you should see the results of the
statement in the Results view. If the statement was a query, the R esults view will
display the returned records. If it's not a query, you'll be notified of the statement's
success and how many rows were affected.