「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';

相關連結

外部連結