创建并授权

sql
grant all privileges on [table_name].* to '[username]'@'localhost' identified by '[password]';

刷新权限

sql
flush privileges;