安装教程:https://www.huaweicloud.com/articles/0c192367ee485a4405c4b7f9ca4215cd.html

    一些命令:
    mysql 登录
    mysql -u用户名 -p密码
    查看端口号
    mysql> show global variables like ‘port’
    授权远程连接
    mysql> grant 权限 on 数据库对象 to 用户

    1. 允许192.168.0.126的主机的myuser用户连接到本机mysql,并用mypassword作为密码<br /> mysql> grant all privileges on *.* to 'myuser'@'192.168.0.126' identified by 'mypassword' with - grant option ;

    防火墙
    查看防火墙状态
    systemctl status firewalld
    暂时关闭防火墙
    systemctl stop firewalld
    永久关闭防火墙
    systemctl disable firewalld