1.下载mariadb

apt-get install mariadb-server-10.0 

2.修改mariadb配置文件

vim /etc/mysql/mariadb.conf.d/50-server.cnf
注释掉下边配置
#bind-address = 127.0.0.1

3.配置mariadb开机自启

systemctl restart mysql
systemctl enable mysql

4.进入mariadb 修改用户密码

#命令行进入mysql,命令如下,第一遍不需要录入密码,回车进入
mysql -u root -p
grant all privileges on *.* to 用户名@对外开放地址 identified by '用户密码' with grant option;
例如:
grant all privileges on *.* to root@localhost identified by '123456' with grant option;
#刷新进去
flush privileges;

5.安装防火墙

apt install firewalld firewall-config
#防火墙开机自启
systemctl enable firewalld
Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐