2
mysql创建用户(如果不存在)
我有一个查询来检查mysql用户列表以创建新用户。 IF (SELECT EXISTS(SELECT 1 FROM `mysql`.`user` WHERE `user` = '{{ title }}')) = 0 THEN CREATE USER '{{ title }}'@'localhost' IDENTIFIED BY '{{ password }}' END IF; 但是我得到这个错误: ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your …