一,首先确定自己部署的数据库,是否可以正常登录,验证部署是否是否成功
bash
mysql -u root -p

二、放开mysql远程访问权限,依次输入这些命令
create user 'root'@'%' identified with mysql_native_password by 'xxxxx';
grant all privileges on *.* to 'root'@'%' with grant option;
flush privileges;

进入mysql,输入sql验证权限是否打开
use mysql
select host,user, from user;

三,在腾讯服务器安全组中放开3306的端口

四、在服务器-防火墙-添加规则

五、尝试用连接工具,连接数据库

六,可以考虑在使用时关闭防火墙,这样可以减少不必要的麻烦。不用时再打开
查看防火墙的状态
bash
systemctl status firewalld
关闭防火墙
bash
systemctl stop firewalld
防火墙的关闭状态

再输入命令永久关闭防火墙
bash
systemctl disable firewalld
不用时可以考虑重新打开
bash
systemctl start firewalld
防火墙打开的状态
