Closed Maokaitou closed 4 years ago
Maybe ‘%’ is better (it’s not common to run your database and application on the same host in production)?
I agree with you. But you used '%' to create a user, but used 'localhost' when resetting permissions. I think it's better to unify.
create user 'springuser'@'%' identified by 'ThePassword'; I recomandation chang ‘%’ to'localhost'
because revoke all on db_example.* from 'springuser'@'localhost'; will throw Error. There is no such grant defined for user 'springuser' on host 'localhost'