I set up a connection to a database but Quarto throws an error when rendering (not if I execute the chunk). The same code in Rmarkdown works smoothly.

```
library(dbplyr)

conn <- DBI::dbConnect(RMySQL::MySQL(),
                 host = "my_hostname",
                 user = "my_user",
                 password = Sys.getenv("PASSWORD_DB"),
                 dbname = "my_db",
                 port=3306)

my_table <- tbl(conn, "my_table")
```
This is the error:
```
#> Quitting from lines 11-28 (ECS_data_mining.qmd) 
#> Error in .local(drv, ...) : 
#>  Failed to connect to database: Error: Access denied for user 
#> my_user'@'2a01:57a0:1608:6300:8818:75ea:8b53:6933' (using password: NO)
#> Calls: .main ... eval -> <Anonymous> -> <Anonymous> -> .local -> .Call

#> Execution halted
```
2022-08-26T07:37:35Z
jospueyo
closed
Problem when connecting to MySQL using environmental variables
https://github.com/quarto-dev/quarto-cli/issues/2145