Showing posts with label user. Show all posts
Showing posts with label user. Show all posts

Wednesday, January 30, 2019

MySQL: create new user

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
FLUSH PRIVILEGES;

Monday, February 5, 2018

Linux: 創建用戶 Add user

創建一個新用戶︰
useradd USERNAME

建立目錄捷徑︰
ln -s FOLDER ACCESS_POINT
注意︰要用絕對路徑,例如FOLDER: /userdata/mkytap/,ACCESS_POINT: /home/mkytap/

為目錄加入權限︰
setfacl -m u:USERNAME:rwx FOLDER