| CREATE USER IDENTIFIED WITH 'caching_sha2_password' AS '$A$005IwwzH/s]6F. ![]() Mysql> SHOW CREATE USER CREATE USER for | Mysql> CREATE USER IDENTIFIED BY 'MyPassword' PASSWORD EXPIRE įollowing is the SHOW CREATE USER query for the above created user − x.ycpOwCHw4U5DkqKEHmlbAB3QrvgjthpimTebHdY2' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK PASSWORD HISTORY DEFAULT PASSWORD REUSE INTERVAL DEFAULT PASSWORD REQUIRE CURRENT DEFAULT | | CREATE USER IDENTIFIED WITH 'caching_sha2_password' AS '$A$005eiknGyZ r]L◄T☻. Mysql> CREATE USER exampleUser IDENTIFIED BY '123456' įollowing query is retrieves/displays the CREATE statement used to create the above user. ExampleĪssume we have created a user using the CREATE statement as shown below − Example Following query creates a role named TestRoleReadOnly. Syntax Following is the syntax of the CREATE ROLE Statement CREATE ROLE IF NOT EXISTS desiredname Where, desiredname is the name of the role you need to create. Where, name is the name of the user for which you need the create statement. To create a role, you need to have CREATE ROLE or CREATE USER privilege. Syntaxįollowing is the syntax of the SHOW CREATE USER Statement. ![]() The SHOW CREATE USER Statement is displays the CREATE statement used to create the specified user. The MySQL CREATE USER statement is used to create a database account that allows the specified user to log into the MySQL database. To create a user account, the current account needs to have CREATE USER privilege, or the INSERT privilege for the MySQL system schema. ![]() You can create a new user account in MySQL using the CREATE USER Statement.
0 Comments
Leave a Reply. |