계정 추가
insert into user (Host, User) values ('%', 'aptman');
update user set Password = password('aptman') where User = 'aptman';
flush privileges;
변경
1.update user set password=password('비밀번호') where user = '[user]';
2.flush privileges;
권한
GRANT ALL PRIVILEGES ON DBNAME.* TO ID@localhsot IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
하드코어 방식
create database testdb;
insert into db values ('%', 'testdb', 'testuser', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
insert into user (Host, User) values ('localhost', 'testuser');
insert into user (Host, User) values ('%', 'testuser');
update user set Password = password('password1234') where User = 'testuser';
flush privileges;
댓글 없음:
댓글 쓰기