apt-get install mysql-server 安装完成之后
一、修改权限1.进入/etc/mysql/mysql.conf.d/目录,修改mysqld.cnf文件中的bind-address为0.0.0.0:
2.mysql新版本远程连接方式:
1.create user 'admin'@'%' identified by '123456'; // 创建用户
2.grant all privileges on *.* to 'admin'@'%' with grant option;// 修改权限
新版本远程连接需要创建远程连接用户
二、开放端口ubantu新版本iptables问题: https://talk.quwj.com/topic/208
使用ufw开放端口命令时报错:ERROR: Couldn't determine iptables versionk
使用:
update-alternatives --list iptables /usr/sbin/iptables-legacy /usr/sbin/iptables-nft By default it uses iptables-nft. When changes to iptables-legacy sudo update-alternatives --set iptables /usr/sbin/iptables-legacy it works with UFW without problems after reboot.
处理完成后正常使用ufw开放端口。
UFW 使用范例:
允许 53 端口
$ sudo ufw allow 53
禁用 53 端口
$ sudo ufw delete allow 53
允许 80 端口
$ sudo ufw allow 80/tcp
禁用 80 端口
$ sudo ufw delete allow 80/tcp
允许 smtp 端口
$ sudo ufw allow smtp
删除 smtp 端口的许可
$ sudo ufw delete allow smtp
允许某特定 IP
$ sudo ufw allow from 192.168.254.254
删除上面的规则
$ sudo ufw delete allow from 192.168.254.254



