- 最新
- 投票最多
- 评论最多
Where did you create the schema? In your Ubuntu instance mariaDB server or in a Lightsail managed database?
If the database tab in Lightsail says there are no databases, then you don't have a managed database.
If you created the schema in your Ubuntu instance, then you'll need to open port 3306 for the instance in order to connect.
Thank you, David. I have opened port 3306 using the Security interface in LightSail.
I see an error made in my questions. The error message is actually 10061, instead of 10060.
So, I am still not connecting. Still getting:
[MySQL][ODBC 8.0(w) Driver] Can't connect to MySQL server on (IP Address) (10061):
.
When I do a netstat, MySQL seems to be listening on 3306, but I don't know about those zeros for an IP...
ubuntu@host:/$ netstat -plutn
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
udp 0 0 127.0.0.53:53 0.0.0.0:* -
udp 0 0 172.26.6.174:68 0.0.0.0:* -
Further, I went into MySQL and granted privileges from any IP address... (less secure, I know)
# GRANT ALL ON database.* TO 'user'@'%' IDENTIFIED BY 'password';
Any thoughts? I continue to wonder about the AWS Lightsail platform, as i am unfamiliar with it... Any platform-specific hurdles I am missing?
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN -
```
The netstat output identifies the problem.
You have the database server configured to listen on 127.0.0.1, which means it will only listen to clients running on that machine.
You'll need to change your /etc/my.cnf file ...
[mysqld]
bind-address = 0.0.0.0
Also, if the my.cnf file shows 'skip-networking', comment that out.
david
相关内容
- AWS 官方已更新 10 个月前
- AWS 官方已更新 3 年前
- AWS 官方已更新 2 年前