今天使用本地连接远程Mysql,一直报java.sql.SQLException:null,messagefromserver:"Host''''isnotallowedtoconnect.这个错误
步骤:一、打开mysql控制台,输入:usemysql;
二、输入:showtables;
三、输入:selecthostfromuser;
四、输入:updateusersethost=''%''whereuser=''root'';
五、打开计算机的服务界面,重新启动mysql服务,远程服务器就允许程序连接数据库了。