MariaDB安装
-
platform: Centos7
-
Install
yum install -y mariadb-server
MariaDB配置使用
-
Using
systemctl start mariadb.service # 启动 systemctl enable mariadb.service # 开机自启
-
Configure
-
首先是设置密码,会提示先输入密码
Enter current password for root (enter for none): <–直接回车
Set root password? [Y/n] <– 是否设置root用户密码,输入y并回车或直接回车
New password: <– 设置root用户的密码
Re-enter new password: <– 再输入一次你设置的密码
其他配置
Remove anonymous users? [Y/n] <– 是否删除匿名用户,Y回车
Disallow root login remotely? [Y/n] <–是否禁止root远程登录, N回车,
Remove test database and access to it? [Y/n] <– 是否删除test数据库,Y回车
Reload privilege tables now? [Y/n] <– 是否重新加载权限表,Y回车2.开启远程访问
-
开启远程访问
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY '123456' WITH GRANT OPTION;
- 刷新权限
flush privileges
- 配置文件地址
-