详解Centos7 修改mysql指定用户的密码
发布时间:2020-05-27 09:38:40 所属栏目:Linux 来源:互联网
导读:本文介绍了Centos7 修改mysql指定用户的密码,具体如下:1.登陆mysql或者mariadb(两种任选其一)[root@localhost ~]# mysql -u root[root@localhost ~]# mysql -uroot -p2.切换到存储用户名和密码的数据库MariaDB [mysql] use mysql;回车,会显示以下内容Readi
|
本文介绍了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: 04.刷新用户权限列表 MariaDB []> ,0 rows affected (0.00 sec)5.退出mysql登陆 MariaDB []>6.重启mysql或者mariadb服务 [root@localhost ~] [root@localhost ~](编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 奇怪:为什么linux在上次ping回复后会响应ping请求?
- linux – 如何编写一个使用image magick将图像切割成碎片的
- 两台应用程序在同一台本地机器之间通信
- linux – 如何顺利更新ntpd的同行列表?
- linux – GNU Autotools:将二进制文件安装到/ bin,/ sbin,
- 具有持久数据的Ruby Gems
- liunux ubuntu/centos 将tar文件夹压缩打包
- linux – 运行ktpass.exe后,Kerberos服务只能运行30分钟
- linux – make / home / tmp noexec nodev没有单独的patiti
- gnu-screen – tmux是否具有屏幕所具有的所有功能?那些屏幕
