Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7577849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:17:31+00:00 2026-05-30T17:17:31+00:00

Short version: I’m trying to figure out how to use the dsn argument in

  • 0

Short version: I’m trying to figure out how to use the dsn argument in the odbcConnect() function to connect to a MySQL database.

Longer version: I appologize if this is an ignorant question. I didn’t find an answer on SO searching under the tags. I’m not new to R, although I’m not the world’s foremost expert. I am new to MySQL. I have been trying to learn it on my own.

I would like to be able to create tables and such in R and write them to a database in MySQL and then be able to select from them later and read the selected records back into R for analysis. I can create a database in MySQL, select, export a text file, & read that file into R now, but I would rather be able to do everything from R. For this purpose, I installed RODBC to be able to connect R to MySQL directly. I understand that I need to use the odbcConnect() function, but I do not understand what to put for the dsn argument to do this, and haven’t been able to figure it out from the wiki or the help file.

Details (if needed):

I did not establish a uid or password when I set up MySQL

Versions used:          Windows XP;     R 2.10.1;     MySQL 5.5
Locations of exe files: C:\Program Files\MySQL\MySQL Server 5.5\bin  
                        C:\Program Files\R\R-2.10.1\bin  

I expect I need fairly basic advice–e.g., it might be best to assume I don’t even know what dsn stands for (even though that’s not actually true). Any help is appreciated. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T17:17:32+00:00Added an answer on May 30, 2026 at 5:17 pm

    The simplest solution I can suggest would be installing RMySQL. This will give you native connectivity to the MySQL database that you are using.

    If you want to use ODBC besides needing to have the MySQL ODBC drivers you will need to set up the ODBC connection in the ODBC manager on Windows XP. When you go through the connection it will ask you for a name, which will be your DSN name, which then you should be able to use in odbcConnect()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Short version: In trying to deal with a legacy database in Ruby-on-Rails, I've come
Short version: When I try to use Access's DatePart function via ODBC, it cannot
Short version: I'm trying to determine the best way to track what the user
Short Version Calls to CommandManager.InvalidateRequerySuggested() take far longer to take effect than I would
Short Version I'm currently looking into an issue with MySQL collations and how they
Short Version How can I do concatMap in MATLAB? I'm trying to build a
Short version: is it safe to use ets:foldl to delete every ETS record as
Short version: How do I initialize and use DirectInput if I have no access
Short version: What kind of escape sequence can one use to search for unicode
Short Version This query works in the database but fails with Linq To NHibernate.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.