mysql 접속허용 및 사용자추가

SELECT user,Host FROM mysql.user; // 확인

INSERT INTO mysql.user (host,user,password) VALUES (‘localhost’,’root’,password(‘$PASSWORD‘)); // 추가

GRANT ALL PRIVILEGES ON *.* TO ‘root’@’$IP‘; // 접근지 설정

FLUSH PRIVILEGES; // 적용

update user set password=password(‘$PASSWORD‘) where user=’root’; // 패스워드변경

사용자 추가~~
insert into user (host, user, password) values(‘localhost’, ‘$ID, password(‘$PASSWORD’));

Leave your Comment

Your email address will not be published. Required fields are marked *