centOS 安装MariaDB

32 阅读1分钟

安装MariaDB,mariadb为客户端,server为服务端,devel为扩展包

yum -y install mariadb mariadb-server mysql-devel;

启动MariaDB服务

systemctl start mariadb;

无密码状态下进入MariaDB,进行密码设置

mysql -u root

MariaDB [(none)]> use mysql;

设置密码为123456

update user set password=password(‘123456’)where user=‘root’;

flush privileges; exit;

重新登录

mysql -u root -p

123456

登录成功

image.png