乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      linux下mysql 5.7及以前版本 root密碼修改方法【轉(zhuǎn)】

       JhouShuai 2017-09-19

       1.首先確認(rèn)服務(wù)器出于安全的狀態(tài),也就是沒有人能夠任意地連接MySQL數(shù)據(jù)庫。 
      因?yàn)樵谥匦略O(shè)置MySQL的root密碼的期間,MySQL數(shù)據(jù)庫完全出于沒有密碼保護(hù)的 
      狀態(tài)下,其他的用戶也可以任意地登錄和修改MySQL的信息??梢圆捎脤ySQL對(duì) 
      外的端口封閉,并且停止Apache以及所有的用戶進(jìn)程的方法實(shí)現(xiàn)服務(wù)器的準(zhǔn)安全 
      狀態(tài)。最安全的狀態(tài)是到服務(wù)器的Console上面操作,并且拔掉網(wǎng)線。 
      2.修改MySQL的登錄設(shè)置: 
      # vi /etc/my.cnf 
      在[mysqld]的段中加上一句:skip-grant-tables 
      例如: 
      [mysqld] 
      datadir=/var/lib/mysql 
      socket=/var/lib/mysql/mysql.sock 
      skip-grant-tables 
      保存并且退出vi。 
      3.重新啟動(dòng)mysqld 
      # /etc/init.d/mysqld restart 
      Stopping MySQL: [ OK ] 
      Starting MySQL: [ OK ] 
      4.登錄并修改MySQL的root密碼 
      # /usr/bin/mysql 
      Welcome to the MySQL monitor. Commands end with ; or \g. 
      Your MySQL connection id is 3 to server version: 3.23.56 
      Type 'help;' or '\h' for help. Type '\c' to clear the buffer. 
      mysql> 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

      5、修改密碼

      Mysql 5.6及以前版本:

      i、

      mysql> UPDATE user SET Password = password ( 'new-password' ) WHERE User = 'root' ; 
      Query OK, 0 rows affected (0.00 sec) 

      Rows matched: 2 Changed: 0 Warnings: 0 
      mysql> flush privileges ; 
      Query OK, 0 rows affected (0.01 sec) 
      mysql> quit 
      Bye

      ii、將MySQL的登錄設(shè)置修改回來 
      # vi /etc/my.cnf 
      將剛才在[mysqld]的段中加上的skip-grant-tables刪除 
      保存并且退出vi。 
      iii、重新啟動(dòng)mysqld 
      # /etc/init.d/mysqld restart 
      Stopping MySQL: [ OK ] 
      Starting MySQL: [ OK ]

      Mysql 5.7版本:

      i、mysql> UPDATE user SET authentication_string = password ( 'new-password' ) WHERE User = 'root' ; 
      Query OK, 0 rows affected (0.00 sec) 

      ii、將配置文件my.cnf 中 skip-grant-tables 注釋掉,重啟 mysql

      iii、使用第一步設(shè)置的密碼登錄mysql,再次修改密碼:

      mysql> set password = password('xxxxxxxx'); (新密碼必須包含大小寫字母,特殊字符,數(shù)字)

      mysql> flush privileges ; 

      Query OK, 0 rows affected (0.01 sec) 

      mysql> quit 

      Bye


      原文地址:http://blog.csdn.net/dszgf5717/article/details/46850471

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶 評(píng)論公約

        類似文章 更多