两步开启mysql远程连接 一,登录mysql # mysql -uroot -p 二,配置远程连接 mysql > GRANT ALL PRIVILEGES ON *.* TO 'user1'@'%'IDENTIFIED BY 'mypassword'; 或 mysql > GRANT ALLPRIVILEGES ON *.* TO 'root'@'%'; mysql > FLUSH PRIVILEGES;