详解Centos7 修改mysql指定用户的密码
发布时间:2020-12-13 14:00:17 所属栏目:Linux 来源:网络整理
导读:本文介绍了Centos7 修改mysql指定用户的密码,具体如下: 1.登陆mysql或者mariadb(两种任选其一) [root@localhost ~] [root@localhost ~] 2.切换到存储用户名和密码的数据库 MariaDB [ ]> completion of table and column names You can turn off this featu
本文介绍了Centos7 修改mysql指定用户的密码,具体如下: 1.登陆mysql或者mariadb(两种任选其一) [root@localhost ~]
[root@localhost ~]
2.切换到存储用户名和密码的数据库 MariaDB []> completion of table and column names You can turn off this feature to get a quicker startup with -
3.修改密码,适用password()函数进行加密,实际上就是执行sql语句来更新指定用户的密码 MariaDB []> update user set password=password('新密码') where user='要更新密码的用户名'->,0 rows affected (0.00: 5 Changed: 0 Warnings: 0
4.刷新用户权限列表 MariaDB []> ,0 rows affected (0.00 sec)
5.退出mysql登陆 MariaDB []>
6.重启mysql或者mariadb服务 [root@localhost ~]
[root@localhost ~]
? (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 在Linux中的单个命令行中执行三个命令
- linux – 没有调用pci_Driver.probe
- Linux 目录结构说明
- mint linux 18.3 遇到“已安装的 post-installation 脚本 返
- 20+ Rsync command’s switches and common usages with ex
- condarc(conda 配置文件) 换国内源
- SSH 维持权限(好用)
- linux – cmake:根据操作系统更改EXTERNALPROJECT_ADD中的
- linux – “docker images”显示图像,“docker rmi”表示“
- linux – chroot和jail之间的区别