“MySQL”的版本间的差异

来自Gea-Suan Lin's Wiki
跳到导航 跳到搜索
常用指令
常用指令
第4行: 第4行:
 
 開帳號順便開權限:
 
 開帳號順便開權限:
 
<syntaxhighlight lang="sql">
 
<syntaxhighlight lang="sql">
GRANT ALL ON trac.* TO `trac`@`127.0.0.1` IDENTIFIED BY 'password_here';
 
 
GRANT ALL ON trac.* TO `trac`@`localhost` IDENTIFIED BY 'password_here';
 
GRANT ALL ON trac.* TO `trac`@`localhost` IDENTIFIED BY 'password_here';
 +
GRANT ALL ON trac.* TO `trac`@`%` IDENTIFIED BY 'password_here';
 
</syntaxhighlight>
 
</syntaxhighlight>
  

2018年7月4日 (三) 02:17的版本

MySQL是一套资料库软体。

常用指令

开帐号顺便开权限:

GRANT ALL ON trac.* TO `trac`@`localhost` IDENTIFIED BY 'password_here';
GRANT ALL ON trac.* TO `trac`@`%` IDENTIFIED BY 'password_here';

删除(同时也会移除权限):

DROP USER 'trac'@'localhost';

只移除权限(单一资料库或是全部):

REVOKE ALL ON trac.* FROM 'trac'@'localhost';
REVOKE ALL FROM 'trac'@'localhost';

相关连结

外部连结