CentOS服务器远程连接数据库设置

CentOS   2023-06-01 09:53   33   0  
CentOS服务器设置本地数据库可以被连接的命令行:

mysql -u root -p;
grant all privileges on *.* to 'root'@'%' identified by 'mysql password' with grant option;
flush privileges;
exit;
service mysqld restart;
 注意:云服务器的入站端口规则添加TCP:3306,宝塔面板安全端口放行3306


博客评论
还没有人评论,赶紧抢个沙发~
发表评论
说明:请文明发言,共建和谐网络,您的个人信息不会被公开显示。