『SQL踩坑日常』MySQL远程连接不了 2017.06.21 小林同學 数据库  热度 ℃ 以root用户登录mysql: grant all privileges on *.* to 创建的用户名@"%" identified by "密码";flush privileges; 例如: mysql>grant all privileges on *.* to linwene@"%" identified by "123456";mysql>flush privileges; 这里就是允许名为linwene用户远程登录, 密码是123456 iptables -L -n --line-numbers 删除对应的drop规则 iptables -D INPUT 6 然后远程连接, 成功连接完美搞定,咕嘿嘿😋~