Unable to setup remote connections MYSQL Ubuntu -
i'm having trouble opening mysql server remote connections. have followed many online guides , appear have wrong. perhaps provide guidance? server details follows:
- ubuntu 12.04 server,
- mysql ver 14.14 distrib 5.5.34, debian-linux-gnu (x86_64) using readline 6.2
/etc/mysql/my.cnf: other stuff too, importantly bind-address...
bind-address = 0.0.0.0
my.conf has following permissions: -rw-r--r-- 1 root root 3516 jan 31 17:12 my.cnf
the server isn't blocked because: telnet mydomain.com 3306
prompts native mysql password.
mysql queries
create user 'myuser'@'%' identified 'mypassword';
grant insert on db.table_v 'myuser'@'%' identified 'mypassword';
flush privileges;
permissions from show grants 'myuser'@'%';
grant usage on . 'myuser'@'%' identified password '****************'
grant insert on
db
.table_v
'myuser'@'%'
i restarted server
problem:
mysql -h mydomain.com -u myuser -p
enter password:
error 1045 (28000): access denied user 'mydomain'@'***myipaddress***' (using password: yes)
i not able login locally user host not specifically local, such '%' or home ip.
this interesting if not typo:
access denied user 'mydomain'
are trying use domain name username? there should myuser instead of mydomain cause give remote permissions myuser only.
also in:
mysql -h mydomain.com -u myuser -p
-h means host mysql server resides, not user's current host. trying other "localhost" when you're locally trying connect database surely gives error cause trying connect database not intend to. suppose connected mysql server locally , typed above line; command try connect server @ mydomain.com user myuser , password provide. if permissions defined run command, you'll access denied error cause connecting different server.
Comments
Post a Comment