sudo mysql -u root -pmysql
将root用户受权给因此链接: grant all privileges on . to 'root'@'%' identified by 'xxxxxx'; 最后一个为mysql密码 让权限当即生效:flush privileges;sql