ubuntu離線安裝mysql ubuntu20.04修改mysql密碼?
ubuntu20.04修改mysql密碼?先剛剛進(jìn)入root模式:sudo-s11后再輸入輸入命令mysql:/home/cdd/Desktop/Django/typeidea-env/typeide
ubuntu20.04修改mysql密碼?
先剛剛進(jìn)入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
下面那是直接修改初始密碼的步驟:
現(xiàn)在mysql發(fā)出命令下鍵入
mysqlgtusemysql
1
1
然后更改密碼:
mysqlgt ALTER USER#39root#39@#39localhost#39IDENTIFIEDWITHcaching_hai2_passwordhe37你的新密碼#39
1
1
到這里新密碼就設(shè)置里再說,下面我們登陸賬號下:
$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