How to Rename user in MySQL Server - MySQL DBA Tutorial

Rename User/Login in MySQL Server

Renaming User account in MySQL Server is very easy. Use below statement to rename user in MySQL.

Syntax:

MySQL> RENAME USER 'Old_User_Name'@'host' TO 'New_User_Name'@'Host';

Example:
Let's say that we have user 'TB' and we would like to Rename to 'TechBrothers' , we can use below statement.

MySQL > RENAME USER 'TB'@'localhost' TO 'TechBrothers'@'localhost';

MySQL Tutorial for Beginners - How to rename user in MySQL Server

2 comments: