Home  • Database • MySQL

Change MySQL user password

Method1 For MySQL server version 5.7.6 or newer:
ALTER USER 'jahid'@'localhost' IDENTIFIED BY '******';
Method2 For MySQL server version 5.7.5 or older:
SET PASSWORD FOR 'jahid'@'hostname' = PASSWORD('*****');
OR
SET PASSWORD FOR 'jahid'@'localhost' = '*****'
Method3 For current user:
SET PASSWORD = '*****';
Note: to see current user:
SELECT CURRENT_USER();

Comments 0


Copyright © 2024. Powered by Intellect Software Ltd