How to Connect to MySQL Database in Eclipse IDE

Ғылым және технология

Follow this guide to connect to MySQL database in Eclipse IDE using Database Development perspective, so you can work with and manage MySQL databases right inside Eclipse IDE, without the need of using an external program like MySQL Workbench or MySQL Command Line client.
Here's what I will share with you in this video:
- Download MySQL JDBC driver
- Make connection to a database (create connection profile)
- Edit data in a table
- Execute some SQL statements
I suppose that you're using these software programs:
- Java Development Kit (JDK)
- Eclipse IDE for Enterprise Java Developers
- MySQL Community server

Пікірлер: 111

  • @jhatpatchutpk
    @jhatpatchutpk3 жыл бұрын

    Thank you for taking out your time and patiently explaining everything in detail.

  • @CodeJava

    @CodeJava

    3 жыл бұрын

    Glad it was helpful!

  • @vijaykumar-wu9jc
    @vijaykumar-wu9jc3 жыл бұрын

    Thank u for this video , from long time am using eclipse I was not knowing , now I learned this

  • @CodeJava

    @CodeJava

    3 жыл бұрын

    You are most welcome. I also know it recently.

  • @favioar
    @favioar Жыл бұрын

    Thank you very very much !!! Great video, you helped me a lot!! 👏👏👏

  • @CodeJava

    @CodeJava

    Жыл бұрын

    Glad it helped!

  • @user-io7rz6ix2s
    @user-io7rz6ix2s Жыл бұрын

    Thank you for your sharing. Your video is very helpful. I have successfully set up the connection in my Eclipse.

  • @CodeJava

    @CodeJava

    11 ай бұрын

    Glad it helped

  • @alternativerey5127
    @alternativerey51272 жыл бұрын

    hey bro now i feel in love whit your knowledge

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    So nice of you. Thanks for watching :)

  • @namjoonsbrokewife159
    @namjoonsbrokewife1593 жыл бұрын

    Hi! after I added JPA, my schema folder is not opening in the Data Source Explorer. please help me

  • @keerthanalokeshkumar2877
    @keerthanalokeshkumar28772 жыл бұрын

    Thanks for this video.

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    You are welcome.

  • @DineshGgoogle
    @DineshGgoogle Жыл бұрын

    Nice to see the name Rani Kumar Krishna :)

  • @CodeJava

    @CodeJava

    Жыл бұрын

    it's a nice name, right?

  • @biswajyotidas6236
    @biswajyotidas62362 жыл бұрын

    Thank u my man

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    Happy to help

  • @vinayvini2628
    @vinayvini26283 жыл бұрын

    I am not finding that database development in an open-perspective path

  • @CodeJava

    @CodeJava

    3 жыл бұрын

    so you need to install database development tools via menu Help > Eclipse marketplace

  • @lexigeib
    @lexigeib3 жыл бұрын

    Hello, when you click on the page to specify the driver and you click on the mySQL JDBC Driver I don not have any versions being displayed. I went into prefrences and looked there too but the only drivers that are available are for ubuntu and linux. Is there more software I need to download in order to access the JDBC drivers?. I cannot add the jar file until I click on a version but there are no versions to click. Thank you.

  • @CodeJava

    @CodeJava

    3 жыл бұрын

    No more software needed. If you don't see any MySQL JDBC version, you can create a new generic JDBC driver and specify the database properties as shown in the video.

  • @solitaryrocky1541
    @solitaryrocky15412 жыл бұрын

    In the JAR list, it doesn't let me add JAR/zip. Do I need to have JDBC drivers in the Name/Type tab?

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    yes, you should see some JDBC drivers in that tab.

  • @dvhuzg
    @dvhuzg2 жыл бұрын

    i'm using Eclipse IDE for Java Developer and it doesn't have Database Connection, so must I download the Eclipse Enterprise to use this function?

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    Yes, or you can install a plugin. Follow this video: kzread.info/dash/bejne/mKxrj8R-nZPQhJM.html

  • @yusufmustari
    @yusufmustari2 жыл бұрын

    Thanks dude

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    Happy to help

  • @jimrogers4346
    @jimrogers4346 Жыл бұрын

    good tank you my teacher

  • @CodeJava

    @CodeJava

    Жыл бұрын

    You are welcome

  • @shammimunnisa1385
    @shammimunnisa13853 жыл бұрын

    Test connection throwing error: Ping failed,java.net.ConnectException MESSAGE: Connection refused: connect

  • @CharanMuktha
    @CharanMuktha9 ай бұрын

    But connection is empty sir in new ->data resource

  • @ktn4
    @ktn43 жыл бұрын

    I didn't know that I can use Eclipse like MySQL workbench in this way :O

  • @CodeJava

    @CodeJava

    3 жыл бұрын

    yeah, that's the power of an IDE (integrated development environment).

  • @aryajha4428
    @aryajha44282 жыл бұрын

    I am not getting database development option in open perspective Any tips please?

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    kindly follow this video: kzread.info/dash/bejne/mKxrj8R-nZPQhJM.html

  • @KCReddy24
    @KCReddy243 жыл бұрын

    How come the database have tables ...was it created by you ? please explain

  • @CodeJava

    @CodeJava

    3 жыл бұрын

    yes, that's right. Suppose that we have an existing database before.

  • @cardenaskristoffercharlesb7170
    @cardenaskristoffercharlesb7170 Жыл бұрын

    Hi, thank you for uploading this. It is very helpful, but I have an issue whenever I try to test the connection, the ping always failed. How can i fix it? thank you

  • @CodeJava

    @CodeJava

    Жыл бұрын

    is MySQL server actually running? Also check typos in JDBC URL, username, password...

  • @sultanahmadsabawoon6030
    @sultanahmadsabawoon6030 Жыл бұрын

    Yeah, Yea! :)

  • @bercinsabagungor2230
    @bercinsabagungor2230 Жыл бұрын

    hi, thanks for this informative video but ı have an issue when ı try to make a conncection profile ı cannot see database development option in the open perspective part. How can ı fix it?

  • @CodeJava

    @CodeJava

    Жыл бұрын

    you need to install it. Follow this video: kzread.info/dash/bejne/mKxrj8R-nZPQhJM.html

  • @wastedtv3853
    @wastedtv3853 Жыл бұрын

    when i go to the open perspective portion i dont have any option for database development. what other option can i use to do this?

  • @CodeJava

    @CodeJava

    Жыл бұрын

    check this video: kzread.info/dash/bejne/mKxrj8R-nZPQhJM.html

  • @shradhakamble9647
    @shradhakamble96472 жыл бұрын

    Sir in my mysql open perspective no database development file there Pls reply sir🙏🏻

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    kindly follow this video: kzread.info/dash/bejne/mKxrj8R-nZPQhJM.html

  • @amb7247
    @amb72473 жыл бұрын

    Is the ping failed due to Mysql not running on a server. Our user is trying to connect to it over VPN. Assuming we can cmd prompt ping the same server's hostname. Wasn't sure about other factors such as Db name, user/pass or port #. I never used the eclipse ide so I'm flying blind in support for the user.

  • @CodeJava

    @CodeJava

    3 жыл бұрын

    I think it would be firewall, network config issues in your case.

  • @naumanarshad1146

    @naumanarshad1146

    2 жыл бұрын

    @@CodeJava how to solve it sir?

  • @hnq145
    @hnq145 Жыл бұрын

    Sao nhiều người dùng MySQL để kết nối với Java mà ko dùng Microsoft SQL Sever vậy ạ??? Mong a giải thích

  • @CodeJava

    @CodeJava

    Жыл бұрын

    đơn giản vì MySQL là mã nguồn mở, nhẹ, nhanh nên phổ biến hơn SQL Server, vốn chủ yếu dùng trong doanh nghiệp.

  • @drfrost938
    @drfrost9382 жыл бұрын

    i have mysql version6.3 can i still connect it? with this connector?

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    it depends on the version of JDBC driver. Check compatibility on MySQL website.

  • @drfrost938

    @drfrost938

    2 жыл бұрын

    @@CodeJava im using mysql workbench 6.3 ce i hope its compatible

  • @drfrost938

    @drfrost938

    2 жыл бұрын

    anyway thank you for the video its good!

  • @All_In_One_Go_2002
    @All_In_One_Go_2002 Жыл бұрын

    which password should we use @ 6:00 min. While giving test connection I am getting as ping failed. Please say what will the error, why I am getting as ping failed.

  • @CodeJava

    @CodeJava

    Жыл бұрын

    that error means MySQL server is not running. So make sure it is running first.

  • @edwinperera9133
    @edwinperera9133 Жыл бұрын

    my option for database management in perspective is not showing

  • @CodeJava

    @CodeJava

    Жыл бұрын

    you need to install DB tools first. Follow this video: kzread.info/dash/bejne/mKxrj8R-nZPQhJM.html

  • @anumaamir3441
    @anumaamir34413 жыл бұрын

    What is the next step? how are we going to write the queries and java code?

  • @CodeJava

    @CodeJava

    3 жыл бұрын

    kindly follow this video: kzread.info/dash/bejne/lql5zcpxitasd9Y.html and this one: kzread.info/dash/bejne/Y6R1mJZmltLPqps.html

  • @cityisbetter
    @cityisbetter9 ай бұрын

    5:49 it shows ''ping failed'' for me, pls help

  • @CodeJava

    @CodeJava

    8 ай бұрын

    check MySQL server, make sure it is running and listening on the port you expect. Also check username and password, which maybe incorrect.

  • @cityisbetter

    @cityisbetter

    8 ай бұрын

    @@CodeJava thanks for the reply, i only had MySQL workbench open, later on realized i need to have MySQL server open

  • @shivangisahgal3399
    @shivangisahgal33993 жыл бұрын

    No database development option is coming while opening open perspective

  • @CodeJava

    @CodeJava

    3 жыл бұрын

    perhaps your Eclipse version is not for Java EE developers. You can install database development from eclipse marketplace (Help > Eclipse marketplace)

  • @jackmaxwell3134

    @jackmaxwell3134

    3 жыл бұрын

    @@CodeJava no it's not. You need to follow @Shaun Pusey's comment here.

  • @muralikrishna1408
    @muralikrishna14082 жыл бұрын

    After specifying the driver connection details, in the test connection process Iam getting the ping failed .what to do?

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    Check if MySQL server is running or not.

  • @niktacgaming6493

    @niktacgaming6493

    2 жыл бұрын

    How to check mysql is running??

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    @@niktacgaming6493 if you're on Windows, open Task Manager, go to Services, look for MySQL

  • @AshfaaqCurimbaccus
    @AshfaaqCurimbaccus3 жыл бұрын

    cannot find database development in perspective on Eclipse

  • @CodeJava

    @CodeJava

    3 жыл бұрын

    it is available in Eclipse Enterprise for Java developers (almost recent versions). So check your Eclipse IDE.

  • @AshfaaqCurimbaccus

    @AshfaaqCurimbaccus

    3 жыл бұрын

    @@CodeJava unavailable

  • @chetansingh3284
    @chetansingh3284 Жыл бұрын

    Sir database development show hi nhi ho raha h

  • @CodeJava

    @CodeJava

    Жыл бұрын

    kindly follow this video: kzread.info/dash/bejne/mKxrj8R-nZPQhJM.html

  • @User45823
    @User45823 Жыл бұрын

    What is the password required for the root username? Is it my system password or do I need to separately set a new password for mysql? Everytime I'm giving my system password , it is showing error in connection. Please help🙏

  • @CodeJava

    @CodeJava

    Жыл бұрын

    the root password is the one you set when installing MySQL server. If you don't remember, you can reset it.

  • @User45823

    @User45823

    Жыл бұрын

    @@CodeJava i had installed eclipse ide initially then for connecting to mysql i installed the sql connector only...do i need to install anything else apart from it? i don't have any other installations related to sql in my system...

  • @CodeJava

    @CodeJava

    Жыл бұрын

    @@User45823 oh, you need to have MySQL server installed on your computer. Or do you have a remote one to connect to?

  • @User45823

    @User45823

    Жыл бұрын

    @@CodeJavano no I don't have any remote one to connect...then I need to install mysql server...thank you for helping 😊 will come back for help if I face further problems😅

  • @surfeurdestemps3193
    @surfeurdestemps31933 жыл бұрын

    Hi , how to connect to h2:mem database from eclipse? 😁

  • @CodeJava

    @CodeJava

    3 жыл бұрын

    I think it's not possible because H2 memory database runs in the same process of the application, whereas Eclipse database tool runs in another process.

  • @surfeurdestemps3193

    @surfeurdestemps3193

    3 жыл бұрын

    @@CodeJava may be like this it's possible : eclipse.github.io/kura/builtin/h2-database.html

  • @tuaninhang2741
    @tuaninhang27412 жыл бұрын

    I've tried for many times but it was always Ping Failed, could anyone give me a reason why??

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    is MySQL running?

  • @tuaninhang2741

    @tuaninhang2741

    2 жыл бұрын

    @@CodeJava oh yes, thank you. I've fixed my problem. your video is so great. thank you so much

  • @jaisuriyar5259
    @jaisuriyar52593 жыл бұрын

    5:48 it shows "ping failed" while testing.

  • @CodeJava

    @CodeJava

    3 жыл бұрын

    Is the MySQL server running? Check JDBC URL (host, port, schema). Check username & password. One of this information is incorrect.

  • @jaisuriyar5259

    @jaisuriyar5259

    3 жыл бұрын

    @@CodeJava 👍

  • @binduniharika343

    @binduniharika343

    2 жыл бұрын

    Ping failed while testing

  • @melodi4564
    @melodi45642 жыл бұрын

    what if i forget my mysql password

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    then you have to reset your root password. reference: stackoverflow.com/questions/16556497/mysql-how-to-reset-or-change-the-mysql-root-password

  • @mesleykuvedrieh4679
    @mesleykuvedrieh46793 жыл бұрын

    I having a problem (ping fail)

  • @CodeJava

    @CodeJava

    3 жыл бұрын

    Something wrong with JDBC URL (port, user, pass.. incorrect). Or the server is not running.

  • @merikhurshudyan7085
    @merikhurshudyan70852 жыл бұрын

    my ping fails why is that?

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    ensure that MySQL server is running.

  • @biswabikashparida9691
    @biswabikashparida96912 жыл бұрын

    My ping is getting failed please help

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    Make sure MySQL server is running. Also check JDBC URL, username and password.

  • @jyotirmaydas5938
    @jyotirmaydas59382 жыл бұрын

    what is the password given

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    it's the password you set when installing MySQL.

  • @XFAWKES94X
    @XFAWKES94X2 жыл бұрын

    Zlatan? ..

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    what do you mean?

  • @farzanabegum708
    @farzanabegum7082 жыл бұрын

    Thank you for your time. I have a question what is the difference if I connect database by using Query as Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/mydb","root","Password");

  • @CodeJava

    @CodeJava

    2 жыл бұрын

    the syntax may differ, yet the purpose is the same.

  • @farzanabegum708

    @farzanabegum708

    Жыл бұрын

    @@CodeJava Thank you, Sir

Келесі