Debian安装MariaDB


环境: Debian9

  1. 安装

sudo apt update

sudo apt install mariadb-server

  1. 验证安装是否成功 

systemctl status mariadb

  1. 配置

  • 进入mysql CLI:

use mysql;

  • 建立用户和密码,并授权远程访问:

grant all privileges on *.* to root@'%' identified by 'password';

  • 刷新权限,使之生效

flush privileges;

  • 查看用户信息

select user,host,port from user;

相关