0
votes

The data from my mysql database are:

user: root

password: query

dbname: bd_test

host: 127.0.0.1

port: 3306

I´m using RStudio, I want to have access locally from another computer. The adress IP of my msql server is: 192.X.X.X

When I run to RStudio, I do the following steps and the following error is displayed:

install.packages("RMySQL")

library("RMySQL")

mydb = dbConnect(MySQL(),user='root',password='query',dbname='bd_test', host='192.X.X.X')

Failed to connect to database: Error: Host 'MYHost-PC' is not allowed to connect to this MySQL server

I added new rules (port) to the firewall window but still not working. Where is the problem? Thanks

1

1 Answers

0
votes

Permits must be enabled in your MySQL server.In your Mysql server console put the next commands (Windows 7):

cd "C:\Program Files\MySQL\MySQL Server 5.7\bin" mysql –u root -p

mysql>GRANT ALL PRIVILEGES ON . TO 'namehost-PC'@'%' IDENTIFIED BY 'Password'WITH GRANT OPTION ;

mysql> FLUSH PRIVILEGIES