Skip to Main Content
HBS Home
  • About
  • Academic Programs
  • Alumni
  • Faculty & Research
  • Baker Library
  • Giving
  • Harvard Business Review
  • Initiatives
  • News
  • Recruit
  • Map / Directions
Research Computing Services
  • Online Requests
  • FAQ
  • Blog
  • Contact Us
  • About Us
  • Faculty Projects
  • Training
  • Compute Cluster & Data Storage
  • Data Practices
  • Help
  • …→
  • Harvard Business School→
  • Research Computing Services→
  • Compute Cluster and Data Storage
    • Compute Cluster and Data Storage
    • Compute Cluster
    • Data Storage
    • Database Server
    • Other Research Computing Environments
    →
  • Database Server
    • Database Server
    • Configuration Files Recommended for Connecting
    • MySQL Client
    • NaviCat
    • NoMachine
    • ODBC
    • Python
    • R
    • SAS
    • Stata
    • Tableau
    • Terminal
    →
  • R→

Database Server

Database Server

  • Configuration Files Recommended for Connecting
  • MySQL Client
  • NaviCat
  • NoMachine
  • ODBC
  • Python
  • R
  • SAS
  • Stata
  • Tableau
  • Terminal

R

R

  • Compute Cluster
  • Data Storage
  • Database Server
    • Configuration Files Recommended for Connecting
    • MySQL Client
    • NaviCat
    • NoMachine
    • ODBC
    • Python
    • R
    • SAS
    • Stata
    • Tableau
    • Terminal
  • Other Research Computing Environments
4ms

Connecting from R via RMariaDB

Similar to Python, you can connect to MariaDB in R with installed packages. RMariaDB is a database interface and MariaDB driver for R. It is aimed at full compliance with R's DBI specification.

R & libraries

RMariaDB can be accessed via CRAN. The package can be installed in R with the following statement:
install.packages("RMariaDB")
And loaded in the R environment executing:
library(DBI)
library(RMariaDB)

.my.cnf

We encourage you to use this configuration file for all connections to the MariaDB server. This file contains the hostname of the server, connection port, login credentials, and the location of the certificate file. It should be saved at the appropriate location in your home folder. Guard this file as you would your credit card number! Please see our Configuration Files page for more information. Please contact RCS if you do not have this file.

Connection code

We encourage you to use our R script file as a template for connecting to the MariaDB server. Please contact RCS if you need assistance.

For detailed information about connecting R to MariaDB please refer to RMariaDB package documentation. For details about retrieving and working with data stored in MariaDB databases refer to the DBI package and dbplyr package documentation.

ǁ
Campus Map
Research Computing Services (RCS) 
Harvard Business School
Baker Library, B90, 25 Harvard Way
Boston, MA 02163
Phone: 617.495.6100
Email: research@hbs.edu
→Map & Directions
→More Contact Information
→Terms Of Service
  • Make a Gift
  • Site Map
  • Jobs
  • Harvard University
  • Trademarks
  • Policies
  • Accessibility
  • Digital Accessibility
Copyright © President & Fellows of Harvard College