Somethea Yuon
Somethea Yuon

Reputation: 1

How stop user in client-side from using MySQL commands when set password to expire from server side during client log in?

  1. I use root to log in on local MySQL Server Machine 192.168.156.33 and create new user test for anonymous host % CREATE USER test IDENTIFIED BY 'password';
  2. I use client machine to log in with user test mysql -u test -h 192.168.156.33 -p
  3. I use server machine again to set test password account to expire by using ALTER USER 'test'@'%' PASSWORD EXPIRE; and use FLUSH PRIVILEGES; Notice that user test still log in on client machine
  4. User test in client machine still can use command: SHOW DATABASES, USE, SELECT,... without show warning to change password
  5. After I use command \r or (exit and log in back), and try to use command, it show warning to change password like normal

What I want is: How to stop user from use commands when set password to expire and show warning to them to change password without reconnect to server?

Picture

Upvotes: 0

Views: 46

Answers (0)

Related Questions