-
MYSQL 유저만들기Php 2020. 5. 1. 10:06
DB유저를 만들기 위해서 아래와 같이 명령어를 사용하면 자꾸 에러가 나왔다.
mysql> GRANT ALL PRIVILEGES ON test.* TO dev@localhost IDENTIFIED BY 'password';
에러 내용
ERROR 1064 (42000): 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 'IDENTIFIED BY 'password'' at line 1
그래서 검색을 해보니 php8버전부터 조금 바뀌었다고 한다. 바뀐 순서대로 해보니 문제 해결!
mysql> create user dev@localhost identified by 'password';
mysql> grant all privileges on test.* to dev@localhost;
참고 사이트:https://qiita.com/yamateion/items/5509484aaf1a02e9cc57
'Php' 카테고리의 다른 글
PHP에서 PDO접속시 에러 「SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client」 (0) 2020.05.01 php 경로 (0) 2019.02.21 댓글