linux下mysql ---- Host '' is not allowed to connect to this MySQL server

mysql>use mysql

mysql>update user set host= '%' where user = 'root';

此时如果提示报错,不用管,继续往下走

select host, user from user;

mysql>flush privileges;  -- * 这一句是刷新刚才的内容  *一定要刷新,因为操作的是系统授权表。