Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I want use MySQL database in R environment. I am using Ubuntu OS. To do this I should install unixODBC or iodbc and install odbc driver for MySQL. I encounter with error in R when I want connect to database: file /usr/lib/odbc/libmyodbc.so not found. But of course that file is in that directory. I googled everything I think. the only clue I have that it is probably problem with mysql odbc driver, it does not see the file (why?). Any help is appreciated.

There is work around to this problem - use rmysql package for R. Nice!

share|improve this question
    
Don't know the answer, but appear "rmysql" is the keyword for what you need, and a package on CRAN. –  blunders Dec 6 '11 at 3:12
1  
Hey man, thank you! rmysql works perfectly! –  ashim Dec 6 '11 at 4:39
    
+1 @Micheal: Great, welcome to Stackoverflow - posted an answer to your question below since it worked and will make the page easier for others to quickly read. Next to the answer I'll post is a checkmark on the left, if you clik that it'll let others know that was the answer that solved the problem. Cheers! –  blunders Dec 6 '11 at 11:02

2 Answers 2

up vote 1 down vote accepted

The "RMySQL" package on CRAN is what you need, here a link for more info:

http://cran.r-project.org/web/packages/RMySQL/

Found the above by Googling "R MySQL".

(NOTE: This answer was first posted as a comment, but worked, so I'm posting it as the answer to clean up the page.)

share|improve this answer

You have different driver for MySql its probably mySQLconnector.Try using this .You dont need to use ODBC drivers for this.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.