1).第一次設(shè)置root密碼 (默認(rèn)root密碼為空)
創(chuàng)新互聯(lián)公司服務(wù)項(xiàng)目包括昌邑網(wǎng)站建設(shè)、昌邑網(wǎng)站制作、昌邑網(wǎng)頁制作以及昌邑網(wǎng)絡(luò)營銷策劃等。多年來,我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢(shì)、行業(yè)經(jīng)驗(yàn)、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,昌邑網(wǎng)站推廣取得了明顯的社會(huì)效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到昌邑省份的部分城市,未來相信會(huì)繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!
1 | [root@MySQL1 ~]# mysqladmin -uroot password '123456' |
2).修改root密碼
1 | [root@mysql1 ~]# mysqladmin -uroot -p123456 password '123456789' |
1 | [root@mysql1 ~]# mysqladmin -uroot -p123456789 password 'hua19900822**' |
3).set password設(shè)置密碼
1 2 3 4 5 | mysql> set password=password('123456'); #修改密碼 Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges; #同步到磁盤上 Query OK, 0 rows affected (0.00 sec) |
4).update語句修改密碼
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | mysql> use mysql; Database changed mysql> select user,host,password from user; +------+-----------+-------------------------------------------+ | user | host | password | +------+-----------+-------------------------------------------+ | root | localhost | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | | root | mysql1 | | | root | 127.0.0.1 | | | root | ::1 | | | | localhost | | | | mysql1 | | +------+-----------+-------------------------------------------+ 6 rows in set (0.00 sec)
mysql> update user set password=PASSWORD('789789') where user='root' and host='localhost'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0
mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) |