• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connecting to MySQL from eclipse

 
Bob Goodman
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have mySql downloaded and the workbench, how do I go about connecting it to Eclipse? First I need to create a server right? weeks ago when I first downloaded mySql I spend a while but was able to do it, since then I am not able to. Maybe that first time I could not either and mistook it as success. Anyway, I have the latest version of MySQL, how do I start a server then connect it to Eclipse?

And if I use GIT or SVN, how do I share the DB data with people I work with, because that is stored "locally," so how do we both have the same data then?

thanks
 
Bob Goodman
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, and would someone be able to help me set this up by weekend? I spent hours and hours and hours on it, and I tried the net for help as well, to no avail.
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you go back a few steps and explain what you're trying to do? I think you may be working against some misconceptions, but it's hard to tell for sure. For example it appears you want to share the data with other people -- naturally, databases are meant to be shared -- but then you ask about that in the context of git and SVN, which have nothing at all to do with setting up a database. Normally you would just run a database server and allow people to connect to it.

And then you mentioned connecting MySQL to Eclipse -- again, I don't know why you would want to do that, so an explanation of your ultimate goals would help.
 
Bob Goodman
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
f
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bob Goodman wrote:And if I use GIT or SVN, how do I share the DB data with people I work with, because that is stored "locally," so how do we both have the same data then?

As already mentioned, Git and Subversion are source control tools and have nothing at all to do with the database. They're how you would share code, not data. Also, whether you write the code in eclipse or not is also pretty much irrelevant.

The data in the DB is shared when the DB is available on a server, and programs use Hibernate (or JDBC, or whatever) to connect to the database.

To use Hibernate, I'd start with the Hibernate tutorial.

 
Bob Goodman
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear, that does not help. My MAIN question is how do I connect to the server with mySql? thanks
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bob Goodman wrote:My MAIN question is how do I connect to the server with mySql? thanks


But that doesn't really make sense. MySQL is the server. If you're asking how to run MySQL, then there are instructions on the MySQL site about how to run the server on whatever operating system you are targeting.

And likewise you don't use Hibernate to store data on the server. At least, not really. Hibernate is a tool which allows you to access the data from Java code without having to write pages and pages of JDBC code.
 
Bob Goodman
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to get a server started on mySQl, then connect that with Eclipse right? This is what I want to do.
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, okay then. Have you installed the server yet? Started it? So far we don't know what you have done, or what you are having a problem with.
 
Bob Goodman
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cant install the server, and when I get a server going, it wont start. I havent seen it in weeks, but weeks ago I spend hours on it and could not fix it, I have not been able to get to it til now.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you say "server", what exactly do you mean? Do you mean the MySQL DB? If so, I'd advise wiping out what you have now, and start fresh using instruction from the MySQL site. Also, bear in mind that mySQL is only one choice of DB. Maybe you'd find it easier to set up an instance of PostgreSQL? MariaDB?

How are you determining whether the DB is successfully running? There are likely tools that come with MySQL that could help. (I'm most familiar with PostgreSQL, so I can't say for sure.)

There are also separate tools, such as Squirrel SQL that you can use to connect to and view the DB.

In any case, until the DB is running correctly, everything else is moot.
 
Bob Goodman
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BEar, I dont need another DB, Iw ant to use MySql, if you dont know abnout it, please dont answer. Thanks
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bob, if you want help you're going to have to start participating in this thread. Just saying "I wanna" isn't helpful.

Here are the steps you have to follow:

1. Download the MySQL server from the MySQL site. Make sure you download the right version of the server, and make sure it's the download which matches the operating system.

2. Install the download. There should be instructions on how to do that available from the same place you found the download.

If you have any problems with any of that, ask a question about those problems. So far you haven't done that, all you have done is to say that you had a problem. That isn't enough information for anybody to give you meaningful help, that's why you haven't been getting meaningful help. Have a look at our FAQ page TellTheDetails (<== click on that link) which should help you to ask better questions.
 
Bob Goodman
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you guys trolling me? I SAID I DID DOWNLOAD mysql and the work bench already, cmon guys read the whole thing please
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:If you have any problems with any of that, ask a question about those problems. So far you haven't done that, all you have done is to say that you had a problem. That isn't enough information for anybody to give you meaningful help, that's why you haven't been getting meaningful help. Have a look at our FAQ page TellTheDetails (<== click on that link) which should help you to ask better questions.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bob Goodman wrote:please dont answer.

Wish granted.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic