Page 1 of 1

Cannot connect remote database mysql

Posted: Fri Feb 06, 2015 8:30 pm
by madip
Hi,
i'm tryng to connect an hosting website to my database on a VPS based on vesta panel.
From my local pc i can connect to remote database on VPS by command line.
But when i try to connect via http protocol (php web site) to remote database the response is
Can't connect to MySQL server on 'xxx.xxx.xxx.xxx'
Can anyone help me?

Re: Cannot connect remote database mysql

Posted: Sun Feb 08, 2015 1:45 am
by skurudo
May be you need check access to port 3306 first?

And then change your my.cnf files ->
[mysqld]
bind-address = your-server-external-ip

Save and close the file and restart mysql

SOLVED Re: Cannot connect remote database mysql

Posted: Wed Feb 11, 2015 7:13 am
by madip
thanks it works.
If i create user in phpmyadmin it doesn't work.
If if create user db in vestacp no problems.
thanks

Re: SOLVED Re: Cannot connect remote database mysql

Posted: Sun Feb 15, 2015 5:43 pm
by skurudo
madip wrote: If i create user in phpmyadmin it doesn't work.
If if create user db in vestacp no problems.
I think answer in one word - priviliges