ubuntu系統(tǒng)怎么安裝mysql linux mysql服務(wù)的重啟命令和停止命令?
linux mysql服務(wù)的重啟命令和停止命令?在Debian/Ubuntu系的Linux系統(tǒng)上,mysql的服務(wù)名是mysql,重新啟動(dòng)服務(wù)應(yīng)該用servicemysqlrestart在RHEL/C
linux mysql服務(wù)的重啟命令和停止命令?
在Debian/Ubuntu系的Linux系統(tǒng)上,mysql的服務(wù)名是mysql,重新啟動(dòng)服務(wù)應(yīng)該用servicemysqlrestart在RHEL/CentOS系的Linux系統(tǒng)上,mysql的服務(wù)名是mysqld,關(guān)機(jī)重啟服務(wù)應(yīng)該要用servicemysqldrestart如果沒有你的課本是基于條件一個(gè)系統(tǒng)來講的,start和restart不使用的服務(wù)名應(yīng)該要是一樣的的,或則大都mysql或則是??磿鴮?shí)踐才能學(xué)會(huì)Linux,命令敲上一試就都不清楚了。
ubuntu20.04修改mysql密碼?
先剛剛進(jìn)入root模式:
sudo-s
1
1
后再鍵入命令mysql
:/home/cdd/Desktop/Django/typeidea-env/typeidea/typeidea#mysql
Welcome
YourMySQLconnectionidis22
Serverversion:8.0.21-0ubuntu0.20.04.4(Ubuntu)
Copyright(c)2000,2020,Oraclewell/同問
OraclenotaregisteredtrademarkforOracleCorporationbut/求求求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下命令下再輸入
mysqlgtusemysql
1
1
后再密碼修改:
mysqlgt ALTER USER#39root#39@#39localhost#39IDENTIFIEDWITHcaching_sha2_passwordby37你的新密碼#39
1
1
到這里新密碼就可以設(shè)置那樣最好,下面我們登錄下:
$mysql-uroot-p
Enterpassword:#這里然后輸入你的新密碼
Welcome 內(nèi)個(gè)g.
YourMySQLconnectionidis28
Serverversion:8.0.21-0ubuntu0.20.04.4(Ubuntu)
Copyright(c)2000,2020,
OraclenotaregisteredtrademarkforOracleCorporationwell/有.its
affiliates.Othernamesmay betrademarksoftheirrespective
owners.Type #39help#39 or #39h#39 for help. Type#39c#39wantclearthe currentinputstatement.
mys