1.編輯mysql配置檔案/etc/my.cnf
[root@node3 ~]
# vim /etc/my.cnf
# [mysqld]
skip-grant-tables //新增此行內容,表示跳過授權表,跳過密碼驗證直接進入資料庫
....
..
2.重啟資料庫,不重啟不會生效
[root@node3 ~]
# systemctl restart mysqld
3.登入資料庫
[root@node3 ~]
# mysql -uroot -p
enter password: //這裡直接回車
....
..mysql> //出現這個就是進到資料庫裡了
4.重新整理許可權,設定密碼
mysql> flush privileges;
query ok, 0 rows affected (0.00 sec)
mysql> alter user 'root'@'localhost' identified by '2356206941';
query ok, 0 rows affected (0.00 sec)
5. 改回配置檔案並重啟服務
[root@node3 ~]
# vim /etc/my.cnf
skip-grant-tables //刪除此行
[root@node3 ~]
# systemctl restart mysqld
6.登入
[root@node3 ~]
# mysql -uroot -p2356206941
....
..type 'help;' or '\h'
for help. type '\c' to clear the current input statement.
mysql>
1.編輯mysql配置檔案/etc/my.cnf
[root@node3 ~]
# vim /etc/my.cnf
# [mysqld]
skip-grant-tables //新增此行內容,表示跳過授權表,跳過密碼驗證直接進入資料庫
....
..
2.重啟資料庫,不重啟不會生效
[root@node3 ~]
# systemctl restart mysqld
3.登入資料庫
[root@node3 ~]
# mysql -uroot -p
enter password: //這裡直接回車
....
..mysql> //出現這個就是進到資料庫裡了
4.修改表中的資料
mysql> update mysql.user set authentication_string = password(
'12345678'
) where user =
'root'
;mysql>
exit
bye
5. 改回配置檔案並重啟服務
[root@node3 ~]
# vim /etc/my.cnf
skip-grant-tables //刪除此行
[root@node3 ~]
# systemctl restart mysqld
6.登入
[root@node3 ~]
# mysql -uroot -p12345678
...type 'help;' or '\h'
for help. type '\c' to clear the current input statement.
mysql>
Linux學習六步曲
第一,學習基本的裸機程式設計。對於學硬體的人而言,必須先對硬體的基本使用方法有感性的認識,更必須深刻認識該硬體的控制方式,如果一開始就學linux系統 學移植那麼只會馬上就陷入乙個很深的漩渦。我在剛剛開始學arm的時候是選擇arm7 主意是當時arm9還很貴 學arm7的時候還是保持著學51微控制器...
安全生產六步法是什麼 安全生產六步法
卓越績效管理模式 管理架構及實施六步法共121頁 財務管理 經管營銷 專業資料。1.8 9.3 73.4 氣象指數 演 橫向 練 0.3 修 0.2 正值 2.6 7.7 8.5 84.5 學習交流ppt 9 安全觀察與溝通 行動 錄入軟體 跟蹤落實 計畫 六步法 6 62 20 1.8 9.3 7...
高效研發團隊建設六步曲
軟體專案管理的主體是軟體開發團隊。乙個軟體專案管理的好壞,很大程度就體現在軟體開發團隊的建設和管理上。專案管理論壇 對美國軟體工程實施現狀的調查結果表明,軟體研發的情況仍然很難 大約只有10 的專案能夠在預定的費用和進度下交付。軟體開發團隊的建設和管理依然是軟體專案管理中乙個十分主要的問題。軟體專案...