MySQL change user login from one plugin type to another I'm in the process of testing MySQL 8.0. 

I have set up a test database, and the first thing I want to do is import my user account from MySQL 5.7.

So to do this I run:

/*ON MySQL 5.7*/
SHOW CREATE USER `username`@`1.2.3.4`;


This gives me:

CREATE USER 'username'@'1.2.3.4' IDENTIFIED WITH 'mysql_native_password' AS '*1BDAB0F57D8247DF5EFE4927F144138B3B7F2C6B' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK;


I run this on MySQL 8.0, and it creates a user. I check I can log in fine. However, the default in MySQL 8.0 is to use the caching_sha2_password plugin for authentication. So how can I upgrade my login to use the new plugin?

(n.b. this is my login, but at some point I will need to move all my colleagues logins, so assume I don't know what the pasword is).

I have looked all over the web, and found lots of docuemntation about the plugin, but none that say how to convert from one type to the other (apart from delete the user and start again, but that's no use if I don't know the password).
Without knowing the user passwords, you can:


Migrate the user accounts as you have described in your question (SHOW CREATE USER)
Set the passwords to 'expired'
ALTER USER user@host PASSWORD EXPIRE;
Ask the users to login and change the passwords. On an expired password, login is possible but the only action possible is to SET the password.