国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > MySQL > 正文

RHEL7_mysql5.7.17_安置初始登錄

2024-07-24 12:31:31
字體:
來源:轉載
供稿:網友
      RHEL7_mysql5.7.17_安置初始登錄:

1 描述
      在rhel7.2 x64 server上,以yum方式安裝完mysql 5.7.17后。
 
      執行mysql -u root -p命令,此時并不知道root密碼是什么。
 
      [root@localhost bin]# mysql -u root -p
 
      Enter password:
 
      ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
 
2 詳細步驟操作
Mysql 安裝完成后臨時密碼存于 /var/log/mysqld.log文件中。獲取自動生成的臨時密碼
 
[root@localhost bin]# grep "password" /var/log/mysqld.log
 
2016-12-26T05:36:59.714175Z 1 [Note] A temporary password is generated for root@localhost: tw=gB-DvY4CI
 
跳過root臨時密碼登錄數據庫修改密碼
 
1. Stop mysql:systemctl stop mysqld
 
2. Set the mySQL environment option
 
systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
 
3. Start mysql usig the options you just set
 
systemctl start mysqld
 
4. Login as root
 
mysql -u root
 
5.  Try to login using your new password:
 
 mysql -u root -p
 

(編輯:武林網)

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 临武县| 高雄县| 仙桃市| 壤塘县| 富源县| 锡林郭勒盟| 信丰县| 东乡县| 于田县| 伽师县| 大名县| 海阳市| 仙居县| 普兰店市| 湟源县| 乐至县| 渝中区| 宁阳县| 色达县| 广州市| 汉川市| 罗山县| 黄山市| 涞源县| 唐山市| 桑植县| 怀柔区| 朝阳市| 克拉玛依市| 瑞金市| 阳城县| 太保市| 宁阳县| 高雄县| 绿春县| 磐安县| 滨州市| 馆陶县| 罗山县| 黔西县| 富民县|