cant connect to database only linode from aonther

both of them have a private ip.

I set my hosts files as the guides say in both servers (php server and mysql server)

127.0.0.1       localhost
127.0.1.1       ubuntu
**** database1.domain.net database1
127.0.0.1 localhost.localdomain localhost

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
2a01:**** database1.localhost.net database1

i set in mysql config(instead of 'databse.server.private.ip' I have my private ip address)

bind-address        = databse.server.private.ip

restart both linodes just to make sure, also make sure both of them have Auto-configure Networking turn on

mysql from my php server just cant connect its say

SQLSTATE[HY000] [2003] Can't connect to MySQL server on '***.****.****'

Please I will take any advice as the guide on linode is from 2011 and deprecated ( https://www.linode.com/docs/databases/m … sql-server">https://www.linode.com/docs/databases/mysql/standalone-mysql-server )

1 Reply

What are the contents of your network configuration file? Can you ping the private IPs from the servers?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct