码迷,mamicode.com
首页 > 数据库 > 详细

linux 允许mysql用户远程访问

时间:2018-04-02 23:56:01      阅读:341      评论:0      收藏:0      [点我收藏+]

标签:gpo   远程访问   slave   drop   use   alter   span   index   proc   

数据库名字(已存在): table

创建mysql新用户,并指定数据库,允许远程访问

mysql用户: test

mysql用户密码: test666

CREATE USER ‘test‘@‘%‘ IDENTIFIED BY ‘test666‘;

GRANT GRANT OPTION ON *.* TO ‘test‘@‘%‘;

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO ‘test‘@‘%‘;

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 `table`.* TO ‘test‘@‘%‘;

GRANT GRANT OPTION ON `table`.* TO ‘test‘@‘%‘;

 

linux 允许mysql用户远程访问

标签:gpo   远程访问   slave   drop   use   alter   span   index   proc   

原文地址:https://www.cnblogs.com/fyandy/p/8698417.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!