ubuntu系统怎么解除密码 ubuntu20.04修改mysql密码?
ubuntu20.04修改mysql密码?
先进入root模式:
sudo -s
1
1
然后输入命令mysql
:/home/cdd/Desktop/Django/typeidea-env/typeidea/typeidea# mysql
Welcome to the MySQL monitor. Commands end with or g.
Your MySQL connection id is 22
Server version: 8.0.21-0ubuntu0.20.04.4 (Ubuntu)
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type #39help#39 or #39h#39 for help. Type #39c#39 to clear the current input statement.
mysqlgt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
下面就是修改初始密码的步骤:
现在mysql命令下输入
mysqlgt use mysql
1
1
然后修改密码:
mysqlgt ALTER USER #39root#39@#39localhost#39 IDENTIFIED WITH caching_sha2_password BY #39你的新密码#39
1
1
到这里新密码就设置好了,下面我们登录下:
$ mysql -u root -p
Enter password: # 这里输入你的新密码
Welcome to the MySQL monitor. Commands end with or g.
Your MySQL connection id is 28
Server version: 8.0.21-0ubuntu0.20.04.4 (Ubuntu)
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type #39help#39 or #39h#39 for help. Type #39c#39 to clear the current input statement.
mys
ubuntu 12.04删除了管理员密码和root密码后无法更改设置,现如何重置,求大神指点~~详细点~~~谢谢~?
“更改root密码:sudo passwd root 更改管理员密码:把上面的root改成相应的账号名。”希望能帮到你
密码 root #39 to clear the current input statement Copyright (c) 2000 2020 Oracle and\/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and\/or itsaffiliates. Other names may be trademarks of their respectiveow
版权声明:本文内容由互联网用户自发贡献,本站不承担相关法律责任.如有侵权/违法内容,本站将立刻删除。