# MariaDB

## Install

```
brew install mariadb

mariadb-install-db --verbose --user=hadley --basedir=/usr/local \
  --datadir=/User/hadley/db/mariadb --tmpdir=/tmp

mysqld --datadir='/Users/hadley/db/mariadb'

mariadb -e "CREATE DATABASE lahman;"
mariadb -e "CREATE DATABASE nycflights13;"
```


## Connect

```{r, eval = FALSE}
install.packages("RMariaDB")

con <- dbConnect(RMariaDB::MariaDB(), dbname = "lahman", password = "")
dbListTables(con)
```

# Shut down

```
mysqladmin shutdown -u root -p
```
