[MySQL] How To Rename a User in MySQL

Trying out hard to rename a user in MySQL but landing yourself no-where? This post will help you Rename a user in MySQL. 

Though one very rarely renames a MySQL user but in case if you have-to in rare situations, this post will help you rename a user in MySQL. In order to rename a user execute the below mentioned SQL

RENAME USER <old_userid> to <new_userid>;

For Eg; In Order to Rename Bob to Rob, the SQL would look like

RENAME USER bob@localhost to rob@localhost ;

Replace the values above with relevant values for your use-case.

If you are looking for ways to create and delete a user in MySQL, read [How-To] Create and Delete Users in MySQL.

 

You can follow me on Twitter at http://twitter.com/vaibhav1981

Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.

Related posts:

  1. [How-To] Create and Delete Users in MySQL
  2. [Wordpress] Optimize and Repair your MySQL Database Using phpMyAdmin
  3. MySQL Tips for Java Developers With Mark Matthews
  4. Migrate MySQL to SQL Server 2008 with Microsoft SQL Server Migration Assistant
  5. [MySQL] Performance Tuning Best Practices

One Response to “[MySQL] How To Rename a User in MySQL”

  1. [...] If you already have an existing user in your MYSQL database and would like to rename the user, refer [MySQL] How To Rename a User in MySQL. [...]

Leave a Reply