LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-14-2011, 09:31 AM   #1
mlnm
Member
 
Registered: Jun 2011
Posts: 96

Rep: Reputation: Disabled
eclipse to mysql


Hi guys, i am trying to connect eclipse to mysql and i googled for the connector and found that is connector jand i downloaded it and read a few tutorials about it but they didn't help , so please help me to install and configure that plugin.
 
Old 11-15-2011, 02:20 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Wait, huh?? Could you explain this again?
If I think I know what you are talking about, would the following help?
http://stackoverflow.com/questions/8...ration-plugins

Cheers,

Josh
 
Old 11-15-2011, 04:46 AM   #3
SecretCode
Member
 
Registered: Apr 2011
Location: UK
Distribution: Kubuntu 11.10
Posts: 562

Rep: Reputation: 102Reputation: 102
This is from memory, and seeing what's on my system, as I'm not using MySQL atm ...

You download the Connector/J archive (tar.gz or zip, tar probably better) file from the MySQL web site.
Unpack it somewhere on your system. I have eclipse in /opt/eclipseNNN/eclipse and I put connector/J into /opt/eclipse351/mysql-connector-java-5.1.12/.
In your eclipse project, add (in project properties - java build path) the external jar which will be something like /opt/eclipse351/mysql-connector-java-5.1.12/mysql-connector-java-5.1.12-bin.jar.
Then in your class you need code like
Code:
String url = "jdbc:mysql://localhost:3306/" + dbname;
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection con = DriverManager.getConnection(url, username, password);
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Metrics plug-in for Eclipse, does it support Eclipse CDT? like2learn Programming 2 04-02-2012 04:13 AM
MySQL - Foreign key failure - but the problem is with Eclipse, I think... nbcohen Linux - Server 2 05-04-2011 09:00 AM
Problems with eclipse and mysql-connector-java post kernel 2.6.26 in Debian robertkey Debian 10 03-24-2010 02:29 AM
Eclipse mp3 player model type: ECLIPSE-CL2BLK Bagatelle Linux - Newbie 0 12-25-2009 02:39 PM
LXer: Gentleware Unveils New Apollo for Eclipse and openArchitectureWare Eclipse Dist LXer Syndicated Linux News 0 10-25-2007 10:30 PM


All times are GMT -5. The time now is 06:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration