-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to connect to database: Error: Access denied for user #177
Comments
Hello, try this: library(DBI) Also, may I ask where your host is? Are you sure you have access to the host from your IP? |
I'm facing the same issue. Have you found a solution yet? |
someone who solved this problem? i have tried several things with out success :( |
Hello, I've got the same issue. I've tried @imcullan 's solution but it did not work. |
The following worked for me. I use Ubuntu 19.04 and this is a mysql_native_password issue. Basically, mysql_native_password is the traditional method to authenticate- it is not very secure (it uses just a hash of the password), but it is compatible with older drivers. My guess is dbConnect is compatible with mysql_native_password. Try this in your mysql terminal
Then it should work fine even without entering the host and port number for a local host.
|
skrishna123g 's solution worked perfectly on the first try. Bravo and you're a lifesaver. I use Ubuntu 18.04, RMySQL in the 'Dark and Stormy Night' version, and RStudio 1.2.5033 ("Orange Blossom"), and MySQL 5.7.30. For whatever reason, the Digital Ocean "droplet" (virtual server") tends to come unstuck on this modification, so it's occasionally necessary to go in via command line monitor or Workbench and re-fix the MySQL_native_password as described above; it takes a few seconds but it's a very minor nuisance. |
when using dbConnect() with a remote host I get this error:
any idea how to resolve it? |
@agusnieto77 can you please tell us exactly which version of RMySQL and which version of R you are using, how you installed it (though CRAN or anaconda or something else) and what sort of authentication your mysql server is using. |
thanks @jeroen . ok. I use: Connect to the MySQL database: concon <- dbConnect(RMySQL::MySQL(), |
For the original question: 1- As in no need to put the actual password, only copy "YOUR_PASSWORD" 2-If still doen´t work remove database 3-Check that your IP address is added to the server permissions/security 4-Check that the DB is available and public connection is allowed 5-If using Windows allow connections to the port 3306 on the Firewall Defender(control panel, security, firewall defender, advanced setting, add inbound rule, port, 3306, allow) |
Thank you very much, I was able to solve it
El jue, 23 jun 2022 a las 5:29, Pilar Rius ***@***.***>)
escribió:
… For the original question:
1-
username="root"
password= "YOUR_PASSWPRD"
As in no need to put the actual password, only copy "YOUR_PASSWORD"
2-If still doen´t work remove database
3-Check that your IP address is added to the server permissions/security
4-Check that the DB is available and public connection is allowed
5-If using Windows allow connections to the port 3306 on the Firewall
Defender(control panel, security, firewall defender, advanced setting, add
inbound rule, port, 3306, allow)
—
Reply to this email directly, view it on GitHub
<#177 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKVQLKG6GFRHAXP4P5JMEQDVQQN5FANCNFSM4C2AE3QQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
hi
sessionInfo():
I try dbConnect method connect remote mysql,but always raise the error
I have try to searching google 、stack overflow, github rstats-db/rmysql /issues,but not fixed
The text was updated successfully, but these errors were encountered: