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
Thank you for taking out your time and patiently explaining everything in detail.
@CodeJava
3 жыл бұрын
Glad it was helpful!
Thank u for this video , from long time am using eclipse I was not knowing , now I learned this
@CodeJava
3 жыл бұрын
You are most welcome. I also know it recently.
Thank you very very much !!! Great video, you helped me a lot!! 👏👏👏
@CodeJava
Жыл бұрын
Glad it helped!
Thank you for your sharing. Your video is very helpful. I have successfully set up the connection in my Eclipse.
@CodeJava
11 ай бұрын
Glad it helped
hey bro now i feel in love whit your knowledge
@CodeJava
2 жыл бұрын
So nice of you. Thanks for watching :)
Hi! after I added JPA, my schema folder is not opening in the Data Source Explorer. please help me
Thanks for this video.
@CodeJava
2 жыл бұрын
You are welcome.
Nice to see the name Rani Kumar Krishna :)
@CodeJava
Жыл бұрын
it's a nice name, right?
Thank u my man
@CodeJava
2 жыл бұрын
Happy to help
I am not finding that database development in an open-perspective path
@CodeJava
3 жыл бұрын
so you need to install database development tools via menu Help > Eclipse marketplace
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
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.
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
2 жыл бұрын
yes, you should see some JDBC drivers in that tab.
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
2 жыл бұрын
Yes, or you can install a plugin. Follow this video: kzread.info/dash/bejne/mKxrj8R-nZPQhJM.html
Thanks dude
@CodeJava
2 жыл бұрын
Happy to help
good tank you my teacher
@CodeJava
Жыл бұрын
You are welcome
Test connection throwing error: Ping failed,java.net.ConnectException MESSAGE: Connection refused: connect
But connection is empty sir in new ->data resource
I didn't know that I can use Eclipse like MySQL workbench in this way :O
@CodeJava
3 жыл бұрын
yeah, that's the power of an IDE (integrated development environment).
I am not getting database development option in open perspective Any tips please?
@CodeJava
2 жыл бұрын
kindly follow this video: kzread.info/dash/bejne/mKxrj8R-nZPQhJM.html
How come the database have tables ...was it created by you ? please explain
@CodeJava
3 жыл бұрын
yes, that's right. Suppose that we have an existing database before.
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
Жыл бұрын
is MySQL server actually running? Also check typos in JDBC URL, username, password...
Yeah, Yea! :)
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
Жыл бұрын
you need to install it. Follow this video: kzread.info/dash/bejne/mKxrj8R-nZPQhJM.html
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
Жыл бұрын
check this video: kzread.info/dash/bejne/mKxrj8R-nZPQhJM.html
Sir in my mysql open perspective no database development file there Pls reply sir🙏🏻
@CodeJava
2 жыл бұрын
kindly follow this video: kzread.info/dash/bejne/mKxrj8R-nZPQhJM.html
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
3 жыл бұрын
I think it would be firewall, network config issues in your case.
@naumanarshad1146
2 жыл бұрын
@@CodeJava how to solve it sir?
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
Жыл бұрын
đơ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.
i have mysql version6.3 can i still connect it? with this connector?
@CodeJava
2 жыл бұрын
it depends on the version of JDBC driver. Check compatibility on MySQL website.
@drfrost938
2 жыл бұрын
@@CodeJava im using mysql workbench 6.3 ce i hope its compatible
@drfrost938
2 жыл бұрын
anyway thank you for the video its good!
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
Жыл бұрын
that error means MySQL server is not running. So make sure it is running first.
my option for database management in perspective is not showing
@CodeJava
Жыл бұрын
you need to install DB tools first. Follow this video: kzread.info/dash/bejne/mKxrj8R-nZPQhJM.html
What is the next step? how are we going to write the queries and java code?
@CodeJava
3 жыл бұрын
kindly follow this video: kzread.info/dash/bejne/lql5zcpxitasd9Y.html and this one: kzread.info/dash/bejne/Y6R1mJZmltLPqps.html
5:49 it shows ''ping failed'' for me, pls help
@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
8 ай бұрын
@@CodeJava thanks for the reply, i only had MySQL workbench open, later on realized i need to have MySQL server open
No database development option is coming while opening open perspective
@CodeJava
3 жыл бұрын
perhaps your Eclipse version is not for Java EE developers. You can install database development from eclipse marketplace (Help > Eclipse marketplace)
@jackmaxwell3134
3 жыл бұрын
@@CodeJava no it's not. You need to follow @Shaun Pusey's comment here.
After specifying the driver connection details, in the test connection process Iam getting the ping failed .what to do?
@CodeJava
2 жыл бұрын
Check if MySQL server is running or not.
@niktacgaming6493
2 жыл бұрын
How to check mysql is running??
@CodeJava
2 жыл бұрын
@@niktacgaming6493 if you're on Windows, open Task Manager, go to Services, look for MySQL
cannot find database development in perspective on Eclipse
@CodeJava
3 жыл бұрын
it is available in Eclipse Enterprise for Java developers (almost recent versions). So check your Eclipse IDE.
@AshfaaqCurimbaccus
3 жыл бұрын
@@CodeJava unavailable
Sir database development show hi nhi ho raha h
@CodeJava
Жыл бұрын
kindly follow this video: kzread.info/dash/bejne/mKxrj8R-nZPQhJM.html
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
Жыл бұрын
the root password is the one you set when installing MySQL server. If you don't remember, you can reset it.
@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
Жыл бұрын
@@User45823 oh, you need to have MySQL server installed on your computer. Or do you have a remote one to connect to?
@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😅
Hi , how to connect to h2:mem database from eclipse? 😁
@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
3 жыл бұрын
@@CodeJava may be like this it's possible : eclipse.github.io/kura/builtin/h2-database.html
I've tried for many times but it was always Ping Failed, could anyone give me a reason why??
@CodeJava
2 жыл бұрын
is MySQL running?
@tuaninhang2741
2 жыл бұрын
@@CodeJava oh yes, thank you. I've fixed my problem. your video is so great. thank you so much
5:48 it shows "ping failed" while testing.
@CodeJava
3 жыл бұрын
Is the MySQL server running? Check JDBC URL (host, port, schema). Check username & password. One of this information is incorrect.
@jaisuriyar5259
3 жыл бұрын
@@CodeJava 👍
@binduniharika343
2 жыл бұрын
Ping failed while testing
what if i forget my mysql password
@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
I having a problem (ping fail)
@CodeJava
3 жыл бұрын
Something wrong with JDBC URL (port, user, pass.. incorrect). Or the server is not running.
my ping fails why is that?
@CodeJava
2 жыл бұрын
ensure that MySQL server is running.
My ping is getting failed please help
@CodeJava
2 жыл бұрын
Make sure MySQL server is running. Also check JDBC URL, username and password.
what is the password given
@CodeJava
2 жыл бұрын
it's the password you set when installing MySQL.
Zlatan? ..
@CodeJava
2 жыл бұрын
what do you mean?
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
2 жыл бұрын
the syntax may differ, yet the purpose is the same.
@farzanabegum708
Жыл бұрын
@@CodeJava Thank you, Sir