1、进到mysql/bin目录下,打开终端,执行:./mysql -u root -p use mysql; update user set host = '%' where user = 'root'; flush privileges;
2、退出 ctrl+z 退出控制台