Account Management Statements 2851 As of MySQL 8.0.22,  CREATE USER  fails with an error if any account to be created is named as the DEFINER  attribute for any stored object. (That is, the statement fails if creating an account would cause the account to adopt a currently orphaned stored object.) To perform the operation anyway, you must have the  SET_USER_ID  privilege; in this case, the statement succeeds with a warning rather than failing with an error. Without  SET_USER_ID , to perform the user-creation operation, drop the orphan objects, create the account and grant its privileges, and then re-create the dropped objects. For additional information, including how to identify which objects name a given account as the  DEFINER  attribute, see Orphan Stored Objects. CREATE USER  either succeeds for all named users or rolls back and has no effect if any error occurs. By default, an error occurs if you try to create a user that already exists. If the  IF NOT EXISTS  clause is given, the statement produces a warning for each named user that already exists, rather than an error. Under some circumstances,  CREATE USER  may be recorded in server logs or on the client side in a history file such as  ~/.mysql_history , which means that cleartext passwords may be read by anyone having read access to that information. For information about the conditions under which this occurs for the server logs and how to control it, see Section 6.1.2.3, “Passwords and Logging” . For similar information about client-side logging, see Section 4.5.1.3, “mysql Client Logging” . There are several aspects to the  CREATE USER  statement, described under the following topics: For each account,  CREATE USER  creates a new row in the  mysql.user  system table. The account row reflects the properties specified in the statement. Unspecified properties are set to their default values: •Password management:  PASSWORD EXPIRE DEFAULT PASSWORD HISTORY DEFAULT PASSWORD REUSE INTERVAL DEFAULT PASSWORD REQUIRE CURRENT DEFAULT ; failed-login tracking and temporary account locking are disabled •Resource limits: Unlimited •Account locking:  ACCOUNT UNLOCK •SSL/TLS:  NONE •Default role:  NONE •Authentication: The authentication plugin defined by the  default_authentication_plugin  system variable, and empty credentials •CREATE USER Binary Logging •CREATE USER Account-Locking Options •CREATE USER Password-Management Options •CREATE USER Resource-Limit Options •CREATE USER SSL/TLS Options •CREATE USER Role Options •CREATE USER Authentication Options •CREATE USER Overview Important CREATE USER Overview