mysql默认的root账号是不支持网络访问的,分配网络用户的语句如下: GRANT ALL ON *.* TO user@'%' IDENTIFIED BY 'user' WITH GRANT OPTION;