今天在开发的过程中遇到mysql的错误提醒
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqladmin -u root -p flush-hosts' at line 1
解决方案: 修改max_connect_errors的值
1.使用终端或cmd查看mysql max_connect_errors
show variables like '%max_connect_errors%';
2.修改max_connect_errors
set global max_connect_errors = 100;
3.查看是否修改成功
show variables like '%max_connect_errors%';