1 安装
# 首先需要安装mariadb-server
yum install -y mariadb-server
# 启动服务
systemctl start mariadb.service
# 添加到开机启动
systemctl enable mariadb.service
2 进行一些安全设置,以及修改数据库管理员密码
[zhaojq@localhost]$ mysql_secure_installation
image.png
3 mysql给root开启远程访问权限
use mysql;
select User,authentication_string,Host from user;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123';
flush privileges;
网友评论