1.创建远程访问,How To Allow Remote Access to MySQL
https://www.digitalocean.com/community/tutorials/how-to-allow-remote-access-to-mysql
https://www.configserverfirewall.com/ubuntu-linux/enable-mysql-remote-access-ubuntu/
2.Beego自动建表遇到问题,没有创建索引权限,但是并没有报错。所以找了半天。
需要进入后台授予对应用户创建Index的权限:
GRANT INDEX on . TO 'remoteuser'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
sudo systemctl restart mysql
要刷新缓存并且重启,不然不生效。