File: _mysql.Rmd

package info (click to toggle)
r-cran-dbplyr 2.3.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,376 kB
  • sloc: sh: 13; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 634 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# MariaDB

## Install

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

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

mysql -u root -e "CREATE DATABASE lahman;"
mysql -u root -e "CREATE DATABASE nycflights13;"
mysql -u root -e "CREATE DATABASE test;"
```

## Start

```
mysqld --datadir='/Users/hadley/db/mysql'
```

## Connect

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

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

# Shut down

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