We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on Vesta 2.0 and expect to release it by the end of 2024. Read more about it: https://vestacp.com/docs/vesta-2-development
Cannot connect remote database mysql from hosting
Cannot connect remote database mysql from hosting
Hi,
the problem is always the same.
I cannot connect hosting php web site on my mysql vesta vps.
From command line i can connect without any problem and from many location.
Mysql log error doesn't trace any error.
I set bind address to my external ip but nothing.
I stopped iptables and fail2ban.
The strange behavior is the for some minute i see website working but then ,after a while, always same message:
Can't connect to MySQL server on 'ip address'
On the other vps (without vesta) i can connect without any problem......(same OS , same mysql version, apache,php etc)
Please give me a solution
thanks
the problem is always the same.
I cannot connect hosting php web site on my mysql vesta vps.
From command line i can connect without any problem and from many location.
Mysql log error doesn't trace any error.
I set bind address to my external ip but nothing.
I stopped iptables and fail2ban.
The strange behavior is the for some minute i see website working but then ,after a while, always same message:
Can't connect to MySQL server on 'ip address'
On the other vps (without vesta) i can connect without any problem......(same OS , same mysql version, apache,php etc)
Please give me a solution
thanks
Re: Cannot connect remote database mysql from hosting
Oh, it's Vesta fault again? ;)
There is simple solution:
[*] firewall of the server must be set-up to enable incomming connections on port 3306
[*] you must have a user in MySQL who is allowed to connect from % (any host) (see manualfor details)
More detailed thread - http://stackoverflow.com/questions/1935 ... -using-php
There is simple solution:
[*] firewall of the server must be set-up to enable incomming connections on port 3306
[*] you must have a user in MySQL who is allowed to connect from % (any host) (see manualfor details)
More detailed thread - http://stackoverflow.com/questions/1935 ... -using-php
Re: Cannot connect remote database mysql from hosting
firewall is set correctly[*] firewall of the server must be set-up to enable incomming connections on port 3306
already done.[*] you must have a user in MySQL who is allowed to connect from % (any host) (see manualfor details)
For a while connection was up. Then after some minutes was down again!
Client error is : SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'ip' (4)
the error code (4) means interrupted system call.
From the remote command line I can make connection and querying wihout problem.
Very strange problem!
Moreover with tcdump i see incoming / outgoing connection:
Code: Select all
10:52:38.688313 IP remoteserver.53428 >localvps.mysql: Flags [S], seq 2938696093, win 14600, options [mss 1460,sackOK,TS val 1253572476 ecr 0,nop,wscale 7], length 0
10:52:38.688363 IP localvps.mysql > remoteserver.53428: Flags [S.], seq 2585169861, ack 2938696094, win 14480, options [mss 1460,sackOK,TS val 21884416 ecr 1253572476,nop,wscale 7], length 0
Re: Cannot connect remote database mysql from hosting
Then problem may be in php.ini
max_execution_time
mysql.connect_timeout
And php limitations.
max_execution_time
mysql.connect_timeout
And php limitations.
[SOLVED ]Re: Cannot connect remote database mysql from hosti
Hosting doesn't allow connection to external database.
So it's not vesta problem. Hosting limitation.
thanks
So it's not vesta problem. Hosting limitation.
thanks
Re: Cannot connect remote database mysql from hosting
Expected unexpected ;-)
Thanks for answer.
Thanks for answer.