delete 문의 권한이 없어 grant문으로 권한을 줄려고 했는데 어떻게 해야 하는지 잘 모르겠습니다. 0 2 2,394

by 박성현장군님 [SQL Query] [2019.03.28 19:50:00]


grant.png (277,986Bytes)

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: DELETE command denied to user 'jspid'@'localhost' for table 'member'

요런 에러가 발생해서 DELETE문을 사용할 수 있는 권한을 주기 위해서

grant all privileges on 'member' to 'jspid'@'localhost' identified by 'jsppass';

 GRANT ALL PRIVILEGES ON *.* to 'jspid'@'localhost' BY 'password' WITH GRANT OPTION;

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON jsptest.* TO jspid'@'localhost;

 

요렇게 GRANT 문을 입력 했는데 전부 오류가 떠서 어케 해야 될지 도저히 모르겠습니다.;;

오류 메시지가

grant all privileges on 'member' to 'jspid'@'localhost' identified by 'jsppass'

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''member' to 'jspid'@'localhost' identified by 'jsppass'' at line 1

입니다

 

by 마농 [2019.03.29 10:12:45]

1. identified by 구문?
2. by 'password' ?
3. 따옴표가 이상함?


by AF™ [2019.03.31 13:21:23]

@localhost는 빼고 아이디인 jspid만 입력해주면 될 것 같은데요.

댓글등록
SQL문을 포맷에 맞게(깔끔하게) 등록하려면 code() 버튼을 클릭하여 작성 하시면 됩니다.
로그인 사용자만 댓글을 작성 할 수 있습니다. 로그인, 회원가입