MySQL给新建用户并赋予权限
生活随笔
收集整理的這篇文章主要介紹了
MySQL给新建用户并赋予权限
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1. 創建新用戶
本地訪問用戶
- create user 'aaa'@'localhost' identfied by '123456';
遠程訪問用戶
- create user 'aaa'@'%' identfied by '123456';
flush privileges;
2. 創建數據庫
- create database testdb;
3.?執行命令為testuser用戶添加使用testDB權限
本地權限
- grant all privileges on mirai.* to 'aaa'@'localhost' identified by '123456' with grant option;
遠程權限
- grant all privileges on mirai.* to 'aaa'@'%' identified by '123456' with grant option;
flush privileges;
總結
以上是生活随笔為你收集整理的MySQL给新建用户并赋予权限的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: https加密过程(详细)
- 下一篇: 利用Nmap对MS-SQLSERVER进