Linux(centos 7.5)服务器安装MariaDB
1、查看Linux系统自带 mariadb
rpm -qa | grep -i mariadb
2、安装mariadb
yum install mariadb-server -y
3、启动
systemctl start mariadb
4、查看启动状态
systemctl status mariadb
5、登录数据库
mysql -uroot -p
没有密码,直接Enter进入既可。
6、设置密码
SET PASSWORD = PASSWORD('123456');
7、为用户添加所有权限(远程登录,增删改)
grant all privileges on *.* to 'root' @'%' identified by '123456';
8、刷新权限
flush privileges;
9、退出MySQL
exit