全部文章 > 2019年11月 (1篇) 排序: 默认 浏览量 更新时间
  • 原创 MySQL 创建用户并只赋予某个数据库的权限

    使用 root 或者其他有权限的账号登录mysql。 如果没有创建,先创建要使用的数据库: create database `test`; 创建一个新用户并设置密码: create user 'test'@'localhost' identified by '123456'; 赋予用户权限: grant all on test.* to 'test'@'localhost'; 其中all表示所有权限,test.*表示test数据库的所有表。 grant命令在用户不存在的时候回自动创建,所以... 阅读全文>>

    MySQL luoluolzb 浏览1148次