權限mysql
use mysql; //username 是你的用戶名,注意替換 ,%是表明全部IP,能夠指定惟一IP update user set host ='%' where user='username'; //刷新權限 flush privileges;
配置sql
mariadb的配置文件在 /etc/mysql/mariadb.conf.d/50-server.cnfrest
[mysqld] bind-address = 0.0.0.0
//配置完成,必須重啓生效 ~:sudo systemctl restart mysql.service