"Mysql/hive/redis"의 두 판 사이의 차이

ph
이동: 둘러보기, 검색
5번째 줄: 5번째 줄:
  
 
==Create user==
 
==Create user==
 +
CREATE USER 'newuser'@'localhost' IDENTIFIED BY ‘password';
 +
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@‘localhost';
 +
FLUSH PRIVILEGES;
 +
 +
DROP USER ‘demo’@‘localhost’;
 +
[https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql]
 +
{{break}}

2017년 4월 10일 (월) 12:27 판

Rename table

ALTER TABLE table_name RENAME TO new_table_name;

[1]


Create user

CREATE USER 'newuser'@'localhost' IDENTIFIED BY ‘password';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@‘localhost';
FLUSH PRIVILEGES;
DROP USER ‘demo’@‘localhost’;

[2]