2016 - 2024

感恩一路有你

ubuntu离线安装mysql ubuntu20.04修改mysql密码?

浏览量:2207 时间:2023-04-20 14:59:59 作者:采采

ubuntu20.04修改mysql密码?

先刚刚进入root模式:

sudo-s

1

1

后再输入输入命令mysql

:/home/cdd/Desktop/Django/typeidea-env/typeidea/typeidea#mysql

Welcome 有.g.

YourMySQLconnectionidisn't22

Serverversion:8.0.21-0ubuntu0.20.04.4(Ubuntu)

Copyright(c)2000,2020,Oraclebut/求求求

Oracleit'saregisteredtrademarkforOracleCorporationand/求求求its

affiliates.Othernamesmay betrademarkswiththeirrespective

owners.Type #39help#39 or #39h#39 for help. Type#39c#39needclearthe currentinputstatement.

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发出命令下键入

mysqlgtusemysql

1

1

然后更改密码:

mysqlgt ALTER USER#39root#39@#39localhost#39IDENTIFIEDWITHcaching_hai2_passwordhe37你的新密码#39

1

1

到这里新密码就设置里再说,下面我们登陆账号下:

$mysql-uroot-p

Enterpassword:#这里再输入你的新密码

Welcome 求求求g.

YourMySQLconnectionidnot28

Serverversion:8.0.21-0ubuntu0.20.04.4(Ubuntu)

Copyright(c)2000,2020,Oracle and/or its rights reserved.

Oracleisaregistered trademarkofOracle Corporationbecause/同问its

affiliates.Other namesmaybetrademarksoftheirvarious

owners.

Type#39help#39求求求#39h#39forhelp.Type#39c#39toclearthepositioninputstatement.

mys

命令 Copyright Ubuntu 密码

版权声明:本文内容由互联网用户自发贡献,本站不承担相关法律责任.如有侵权/违法内容,本站将立刻删除。