티스토리 뷰

728x90

https://stackoverflow.com/questions/13357760/mysql-create-user-if-not-exists

 

mysql create user if not exists

I have a query to check mysql users list for create new user. IF (SELECT EXISTS(SELECT 1 FROM `mysql`.`user` WHERE `user` = '{{ title }}')) = 0 THEN CREATE USER '{{ title }}'@'localhost' IDENT...

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[JUnit] Assert API  (0) 2022.01.10
[Java] type: a.getClass().getName()  (0) 2022.01.10
[MySQL] CREATE USER IF NOT EXISTS 'user'@'localhost' IDENTIFIED BY 'password';  (0) 2022.01.10
[MySQL] mysql -e 'source query.sql'  (0) 2022.01.10
[Java] @Slf4j; log.info("asdf")  (0) 2022.01.04
MQTT  (0) 2022.01.02
댓글
댓글쓰기 폼