首页 > 技术文章 > 远程连接MariaDB数据库

conpi 2022-05-11 11:37 原文

1. 连接数据库
2. 授权并刷新权限
grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;
flush privileges;
3. 查看用户数据

use mysql
select user, password, host from user;
4.修改配置文件,注释bind-address

配置文件地址:/etc/mysql/mariadb.conf.d/50-server.cnf

5.重启数据库

sudo systemctl restart mysql

推荐阅读