Mysql8.0命令


1.創建用戶 

create user 'username'@'localhost' identified by 'pwd'

2.修改訪問權限

 在mysql數據下修改user表用戶host為'%'

update user set host='%' where user='username'

3.修改密碼

MYSQL8.0密碼默認加密方式為 default_authentication_plugin=caching_sha2_password 所以會造成不兼容問題

alter user 'username'@'localhost' identified with mysql_native_password by 'newpwd'

4.修改操作權限

MYSQL 8.0不支持創建用戶時授權,必須先創建,后授權

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

 


免責聲明!

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



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