我有一个在云上运行的 MySQL,我需要创建具有选择权限的用户以在应用程序中使用。然后,这些用户应该能够从外部连接。
我这样做了:
mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
mysql> GRANT SELECT ON db.* TO 'monty'@'localhost'
mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';
mysql> GRANT SELECT ON db.* TO 'monty'@'%';
我的/etc/mysql/my.cnf
是这样的:
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 0.0.0.0
#skip-networking
但是我无法连接本地主机之外的 monty
。 MySQL Workbench 给我错误 10060
最佳答案
我必须在 Amazon EC2 管理控制台上添加端 Eloquent 能工作。现在我可以从外部访问我的 MySQL 服务器了。
关于MySQL 不允许远程连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32459000/