#install.packages("RMySQL")
library(DBI)
library(RMySQL)
ti_site_connection = dbConnect(RMySQL::MySQL(),
dbname='nome_bd',
host='host_bd',
port=3306,
user='usuario_bd',
password='senha_bd')
dbListTables(ti_site_connection) # listando tabelas no Banco
# Consulta Simples
estatistica_result =dbSendQuery(estatistica_volpe_connection, "select * from tabela")
# as primeiras 15 linhas
data.frame = fetch(estatistica_result, n = 15)
View(data.frame)
Este artigo foi útil ?
SimNão
Last modified: 28 de janeiro de 2023