SQL recomandation
Maokaitou opened this issue · comments
毛开头 commented
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'
Dave Syer commented
Maybe ‘%’ is better (it’s not common to run your database and application on the same host in production)?
毛开头 commented
I agree with you. But you used '%' to create a user, but used 'localhost' when resetting permissions. I think it's better to unify.