Configure Mysql connection in eclipse

Asked

Viewed 7,063 times

1

I wonder if you have how to make a connection to Mysql by Eclipse.

Thanks in advance.

  • Yes it is possible to connect the eclipse directly to Mysql, the first step is to download the .jar from Mysql to configuration.

  • Which eclipse do you use? JEE, PHP etc?

  • JEE. Could post a code of how to do?

  • I’m putting together a response :)

  • Actually I wanted to create tables from the database using jpa, but always from the connection failure.

  • 1

    I edited the question because "phpmyadmin" is not a "database", read this to understand the differences: What is the difference between mysql and phpmyadmin?

Show 1 more comment

1 answer

1


The first step is to lower the Jconnector on the Oracle website

In the JEE eclipse, change the database perspective, usually this option is in the upper right corner.

inserir a descrição da imagem aqui

Right click on database Connections, new option.

inserir a descrição da imagem aqui

In the next screen select the desired database(Mysql), in the next informs the connection data as server, user, password and database.

inserir a descrição da imagem aqui

  • What I do with Jconnector?

  • @Raphaelmelo didn’t need it? sometimes vc need to connect pq the connection is via jdbc.

  • I couldn’t, which I should put in the URL.

  • @Raphaelmelo only changes the database for your base name. do not forget the password user(fields below);

  • i managed to connect and view all tables, however, the tables come without the fields. What can be?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.