最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

解決yum方式安裝的MySQL 5.7 root用戶密碼丟失問題

2021-11-02 11:30 作者:Vecloud_  | 我要投稿


1、沒有輸入或輸入錯誤的root用戶密碼,無法進入數(shù)據(jù)庫:?
# mysql -uroot -p?
(1)沒有輸入root用戶密碼,直接回車:?

(2)輸入錯誤的root用戶密碼:?

2、強制結(jié)束MySQL進程:?
# yum -y install psmisc?
# killall mysqld?
# pkill mysqld?
# ps -ef | grep mysql?
# ss -tunlp | grep 3306?
3、使用mysqld命令,增加--skip-grant-tables參數(shù),跳過權(quán)限表,啟動數(shù)據(jù)庫:?
# mysqld --defaults-file=/etc/my.cnf --user=mysql --skip-grant-tables &?
# ps -ef | grep mysql?
# ss -tunlp | grep 3306?
4、使用mysql命令直接進入數(shù)據(jù)庫,為root用戶設(shè)置新的密碼并刷新權(quán)限:?
# mysql?
mysql> use mysql;?
mysql> update user set authentication_string=password('root@1234') where user='root';?
mysql> flush privileges;?

5、重啟數(shù)據(jù)庫:?
# killall mysqld?
# pkill mysqld?
# ps -ef | grep mysql?
# ss -tunlp | grep 3306?
# systemctl start mysqld?
6、輸入root用戶新設(shè)置的密碼root@1234,進入數(shù)據(jù)庫:?
# mysql -uroot -p

了解更多網(wǎng)絡(luò)知識關(guān)注:http://www.vecloud.com/

解決yum方式安裝的MySQL 5.7 root用戶密碼丟失問題的評論 (共 條)

分享到微博請遵守國家法律
南昌市| 北流市| 襄垣县| 曲沃县| 克拉玛依市| 宜兴市| 东乡族自治县| 天门市| 临朐县| 尉氏县| 屯留县| 尤溪县| 襄城县| 静安区| 柏乡县| 肃北| 阿合奇县| 定结县| 丁青县| 秀山| 朝阳市| 阳高县| 河西区| 赤水市| 丰台区| 丰顺县| 邯郸县| 郸城县| 深州市| 福安市| 江山市| 九龙坡区| 黄骅市| 泸州市| 台北市| 枣阳市| 临沧市| 文水县| 陵水| 临澧县| 黔南|