C# MySQL Raspberry Pi - Access denied for user -
heyhey!
i having issues mysql server on raspberry pi. works flawlessly connect remotely both pc , others in house, when send application friend, get:
"access denied user "admin2"----."
things i've tried:
• quoting out bind-address in config file, using static ip rpi, , using 0.0.0.0 ip.
• added line "skip-name-resolve" in "/etc/mysql/my.cnf" file.
• port 3306 open on router. checked using canyouseeme.
the following queries:
create user 'admin2'@'%' identified 'password'; grant privileges on database.* 'admin2'@'%'; flush privileges; show grants 'admin2'; | grant usage on *.* 'admin2'@'%' identified password '<lots of encrypted password letters here assume>' grant privileges on 'database.* 'admin2'@'%'
i have logindata.settings in visual studio project strings: username, password & ipstring each has textbox assigned them saves info. tried connecting using pi's static ip ip obtained whatsmyip.
project.logindata.default.username = this.usernametext.text; project.logindata.default.password = this.passwordtext.text; project.logindata.default.ipstring = this.iptest.text;
and connect string.
string wsun = project.logindata.default.username; string wspw = project.logindata.default.password; string wsip = project.logindata.default.ipstring; string projectconnect = "datasource=" + wsip + ";port=3306;username=" + wsun + ";password=" + wspw;
i clueless. in advance!
don't forget mysql set listen on 127.0.0.1 default. in other words default instance not listen public ip addresses. bind instead 0.0.0.0 otherwise listen local linux sockets.
Comments
Post a Comment