最終更新 1 year ago

這段 MySQL 指令 用於 建立 root 帳戶並賦予全域權限,適用於 開放遠端連線的 MySQL 伺服器。

timmy revised this gist 1 year ago. Go to revision

No changes

timmy revised this gist 1 year ago. Go to revision

No changes

timmy revised this gist 2 years ago. Go to revision

1 file changed, 6 insertions

setup_root_user_permissions.sql(file created)

@@ -0,0 +1,6 @@
1 + CREATE USER 'root'@'%' IDENTIFIED BY 'my_root_pwd';
2 + GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
3 + FLUSH PRIVILEGES; -- 重新整理權限表
4 +
5 + ALTER USER 'root'@'%' IDENTIFIED BY 'my_root_pwd';
6 + FLUSH PRIVILEGES; -- 重新整理權限表
Newer Older