1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時間:8:30-17:00
      你可能遇到了下面的問題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
      mysql忘記root密碼怎么處理

      下面一起來了解下MySQL忘記root密碼怎么處理,相信大家看完肯定會受益匪淺,文字在精不在多,希望mysql忘記root密碼怎么處理這篇短內(nèi)容是你想要的。

      創(chuàng)新互聯(lián)主要從事成都網(wǎng)站制作、成都網(wǎng)站設(shè)計、網(wǎng)頁設(shè)計、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)東寶,十年網(wǎng)站建設(shè)經(jīng)驗(yàn),價格優(yōu)惠、服務(wù)專業(yè),歡迎來電咨詢建站服務(wù):18982081108

      mysql忘記了超級用戶管理密碼,可以利用重新啟動mysql進(jìn)程的時候帶 --skip-grant-tables參數(shù)來啟動數(shù)據(jù)庫,并空密碼登錄。這個就是相當(dāng)于是數(shù)據(jù)庫第一次啟動的時候。隨后可以查看mysql.user表里面的超級用戶,以及修改超級用戶的密碼

      1# 關(guān)閉MYSQL instance,或者殺死進(jìn)程

      2# 重新啟動mysql,帶--skip-grant-tables語句

      [mysql@mysql01 my.cnf.d]$ mysqld_safe --defaults-file='/data/mysqldata/3306/my.cnf'  --skip-grant-tables &
      [1] 32530
      [mysql@mysql01 my.cnf.d]$ 180828 19:02:13 mysqld_safe Logging to '/data/mysqldata/3306/data/../mysql-error.log'.
      180828 19:02:13 mysqld_safe Starting mysqld daemon with databases from /data/mysqldata/3306/data
      
      [mysql@mysql01 my.cnf.d]$ 

      3# 空密碼登錄MySQL

      [mysql@mysql01 my.cnf.d]$ msyql -S /data/mysqldata/3306/mysql.sock 
      bash: msyql: command not found...
      [mysql@mysql01 my.cnf.d]$ mysql -S /data/mysqldata/3306/mysql.sock 
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      Your MySQL connection id is 1
      Server version: 5.6.31-log Source distribution
      
      Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
      
      Oracle is a registered trademark of Oracle Corporation and/or its
      affiliates. Other names may be trademarks of their respective
      owners.
      
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      (root@localhost)[(none)]> 

      4# 修改mysql.user表

      (root@localhost)[(none)]> use mysql;
      Reading table information for completion of table and column names
      You can turn off this feature to get a quicker startup with -A
      
      Database changed
      (root@localhost)[mysql]> 
      (root@localhost)[mysql]> select user,host,password from user;
      +------+-----------+-------------------------------------------+
      | user | host      | password                                  |
      +------+-----------+-------------------------------------------+
      | root | localhost | *A0F874BC7F54EE086FCE60A37CE7887D8B31086B |
      +------+-----------+-------------------------------------------+
      1 row in set (0.00 sec)
      
      (root@localhost)[mysql]> update user set password=password('password123') where user='root';
      Query OK, 0 rows affected (0.00 sec)
      Rows matched: 1  Changed: 0  Warnings: 0
      
      (root@localhost)[mysql]> 

      5# 正常關(guān)閉數(shù)據(jù)庫

      [mysql@mysql01 my.cnf.d]$ mysqladmin -S /data/mysqldata/3306/mysql.sock -uroot -p'password123' shutdown
      Warning: Using a password on the command line interface can be insecure.
      180828 19:04:54 mysqld_safe mysqld from pid file /data/mysqldata/3306/mysql.pid ended
      [1]+  Done                    mysqld_safe --defaults-file='/data/mysqldata/3306/my.cnf' --skip-grant-tables
      [mysql@mysql01 my.cnf.d]$ 

      6# 正常開啟數(shù)據(jù)庫

      [mysql@mysql01 my.cnf.d]$ mysqld_safe --defaults-file='/data/mysqldata/3306/my.cnf'  &
      [1] 33094
      [mysql@mysql01 my.cnf.d]$ 180828 19:05:04 mysqld_safe Logging to '/data/mysqldata/3306/data/../mysql-error.log'.
      180828 19:05:04 mysqld_safe Starting mysqld daemon with databases from /data/mysqldata/3306/data
      
      [mysql@mysql01 my.cnf.d]$

      7# 正常登錄數(shù)據(jù)庫

      [mysql@mysql01 my.cnf.d]$ mysql -uroot -S '/data/mysqldata/3306/mysql.sock' -p'password123'
      Warning: Using a password on the command line interface can be insecure.
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      Your MySQL connection id is 1
      Server version: 5.6.31-log Source distribution
      
      Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
      
      Oracle is a registered trademark of Oracle Corporation and/or its
      affiliates. Other names may be trademarks of their respective
      owners.
      
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      (root@localhost)[(none)]> 

      至此mysql的root密碼修改完成

      看完mysql忘記root密碼怎么處理這篇文章后,很多讀者朋友肯定會想要了解更多的相關(guān)內(nèi)容,如需獲取更多的行業(yè)信息,可以關(guān)注我們的行業(yè)資訊欄目。


      當(dāng)前文章:mysql忘記root密碼怎么處理
      本文來源:http://ef60e0e.cn/article/ijdeoh.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        定州市| 肥东县| 滦南县| 静宁县| 临潭县| 东平县| 洪洞县| 寿阳县| 德江县| 三河市| 马龙县| 乐亭县| 达孜县| 内丘县| 景宁| 山丹县| 海南省| 新田县| 湘潭县| 九江县| 唐海县| 界首市| 油尖旺区| 潮安县| 维西| 扶余县| 安康市| 溧阳市| 青阳县| 公安县| 汨罗市| 闽侯县| 沿河| 独山县| 云安县| 澜沧| 静乐县| 大竹县| 武清区| 天气| 富川|