yum安装MariaDB

一、安装

yum -y install mariadb mariadb-server

 

二、启动

systemctl start mariadb

 

三、设置开机启动

systemctl enable mariadb

 

四、MariaDB的相关简单配置

mysql_secure_installation

首先是设置密码,会提示先输入密码mysql

Enter current password for root (enter for none):<–初次运行直接回车sql

设置密码数据库

Set root password? [Y/n] <– 是否设置root用户密码,输入y并回车或直接回车
New password: <– 设置root用户的密码
Re-enter new password: <– 再输入一次你设置的密码测试

其余配置spa

Remove anonymous users? [Y/n] <– 是否删除匿名用户,回车code

Disallow root login remotely? [Y/n] <–是否禁止root远程登陆,回车,server

Remove test database and access to it? [Y/n] <– 是否删除test数据库,回车rem

Reload privilege tables now? [Y/n] <– 是否从新加载权限表,回车it

初始化MariaDB完成,接下来测试登陆io

mysql -u帐号 -p密码

相关文章
相关标签/搜索