LoginSignup
0
0

More than 3 years have passed since last update.

mysql : selectしかできないuserの作り方

Posted at

特定tableでselectだけできるようにする

phpmyadminからうまくできなかったので、手で打った

-- 権限適当でuser作る
-- GRANT ALL PRIVILEGES ON *.* TO 'sato'@'%' IDENTIFIED BY 'password';

今回はここからcuiでやった

-- いったん全権限を消す。
REVOKE ALL PRIVILEGES,GRANT OPTION from 'sato'@'%'; 

-- table指定で select だけ許可
GRANT select  ON mydb.mytable TO  'sato'@'%'; 

-- phpmyadmin に historyを残せるように
GRANT select,delete, insert, update  ON phpmyadmin.* TO  'sato'@'%'; 

雑。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0