mysql數據庫訪問權限限制設置


---只能本地訪問,設置隨意訪問

    update user set host='%' where host='localhost';

    flush privileges;

---隨意訪問,設置只能本地訪問

   update user set host = "localhost" where user = "hello" and host= "%";

   flush privileges;

---設置固定的ip可以訪問

  GRANT ALL PRIVILEGES ON *.* TO 'hello'@'133.22.88.77' IDENTIFIED BY 'mysql_password' WITH GRANT OPTION;

  flush privileges;

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM