MySql 创建数据库, 创建用户,指定用户只能访问指定的数据库
1、创建数据库CREATE DATABASE dbname;2、创建用户CREATE USER 'UserName'@'%' IDENTIFIED BY 'Password';3、设置访问指定数据库权限GRANT SELECT, INSERT, UPDATE, REFERENCES, DELETE, CREATE, DROP, ALTER, INDEX, TRIGGER,...
·
1、创建数据库
CREATE DATABASE dbname;
2、创建用户
CREATE USER 'UserName'@'%' IDENTIFIED BY 'Password';
3、设置访问指定数据库权限
GRANT SELECT, INSERT, UPDATE, REFERENCES, DELETE, CREATE, DROP, ALTER, INDEX, TRIGGER, CREATE VIEW, SHOW VIEW, EXECUTE, ALTER ROUTINE, CREATE ROUTINE, CREATE TEMPORARY TABLES, LOCK TABLES, EVENT ON `dbname`.* TO 'UserName'@'%';
GRANT GRANT OPTION ON `dbname`.* TO 'UserName'@'%';
更多推荐
已为社区贡献2条内容
所有评论(0)