You can lock MySQL user from MySQL database and also unlock them.
You can only modify MySQL user with root privileges and that’s why it is must to have root access.
You can login to MySQL as a root use this command:
Now you have to run below command to lock user:
And you have to run below command to unlock user:
You can only modify MySQL user with root privileges and that’s why it is must to have root access.
You can login to MySQL as a root use this command:
Code:
# mysql
Code:
ALTER USER 'db_user'@'localhost' ACCOUNT LOCK;
Code:
ALTER USER 'db_user'@'localhost' ACCOUNT UNLOCK;