Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4141745
  • 博文数量: 447
  • 博客积分: 1241
  • 博客等级: 中尉
  • 技术积分: 5786
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-27 06:48
个人简介

读好书,交益友

文章分类

全部博文(447)

文章存档

2023年(6)

2022年(29)

2021年(49)

2020年(16)

2019年(15)

2018年(23)

2017年(67)

2016年(42)

2015年(51)

2014年(57)

2013年(52)

2012年(35)

2011年(5)

分类: Mysql/postgreSQL

2020-11-03 16:43:00

centos下MariaDB重置密码和ubuntu下mysql 有很大不同.
1  Check the version of our MariaDB Server
mysql --version
mysql  Ver 15.1 Distrib 10.4.12-MariaDB, for Linux (x86_64) using readline 5.1
2 stop MariaDB service
systemctl stop mariadb.service
3 start MariaDB database in safe mode without loading the privileges tables
mysqld_safe --skip-grant-tables --skip-networking &
4 使用mysql -u root登入
5 set the new password for root user, we have to load the privileges tables into memory
FLUSH PRIVILEGES;
6 set a new password for MariaDB root user
ALTER USER 'root'@'localhost' IDENTIFIED BY '111111';
返回
Query OK, 0 rows affected (0.001 sec)
7 Reload the privileges tables again
FLUSH PRIVILEGES;
New password for MariaDB root user has been set
阅读(861) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~