上面的localhost要改为%号就打开了远程访问 ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'fengzi2141';