mariadb 配置远程访问

Auth:admin Date:2022-06-16 19:14:20 Cat:技术笔记


执行命令:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;

编辑:vi /etc/mysql/mariadb.conf.d/50-server.cnf

注释掉下面的行(在前面加#)

# bind-address            = 127.0.0.1

最后重启服务

systemctl restart mysql

如果找不到该配置在哪个文件里面,可以通过如下命令进行查找:

 grep -r "bind-address" /etc/mysql/*
标签: