简体   繁体   中英

Restrict Mysql User login from workbench, should connect to MYSQL from application only

I have two MYSQL users called Adam, Barry.

  1. Adam user will connect to DB through application only[ java , hibernate ].
  2. Barry user connects to DB through workbench or MySQL editor to perform DB operations like update, DB backup and etc.

Now, I want to restrict Mysql user Adam, He should connect DB through app only.
He should not connect to DB in any other form. welcome for any suggestions.

I have tried to add restrictions MySQL user, but I didn't get any proper solution.

More Details:

Application   : Java-based web application
DB server     : AWS Linux
MYSQL version : 8

When your application in official server,the server's IP is fixed,you can set IP for DB user A.

It can realize let user A connect db through server's IP only.

Hope this answer can help you,thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM