mysql5.7創建用戶 分配權限


創建用戶(%表示隨處可登錄,localhost表示只能本地登錄

create user 'username'@'%' identified by 'password';

 

分配權限

grant all privileges on tableName.* to 'username'@'%';

 

刷新權限

flush privileges;

 

如果報錯ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

先執行flush privileges;再進行操作


免責聲明!

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



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