centos7安装mariadb

2019-10-16  本文已影响0人  牍中玉的小木屋

使用yum安装mariadb

初始化配置mariadb

重置密码

  1. 以安全模式进入mariadb
    • systemctl status mariadb
    • systemctl stop mariadb
    • mysqld_safe --skip-grant-tables
  2. 新建一个ssh连接窗口,进入bash,连接数据库
    • mysql -uroot -p
  3. 重置密码,退出mariadb数据库
    • use mysql;
    • update user set password=PASSWORD('123456') where user='root';
    • update user set authentication_string=PASSWORD('123456') where user='root';
    • flush privileges;
    • quit
  4. 重启mariadb数据库,使用密码进入mariadb数据库
    • systemctl restart mariadb
    • mysql -uroot -p

查看mariadb进程是否正常

上一篇 下一篇

猜你喜欢

热点阅读