Ubuntu远程连接MySQL(connection refused)解决方法
来源:互联网 发布:js touchevent事件 编辑:程序博客网 时间:2024/06/07 11:38
一、判断ubuntu是否开启防火墙
- 1
开放防火墙3306端口
- 1
二、查看3306端口是否打开
注意:红色框框表示3306绑定的ip地址–>未修改前为:127.0.0.1:3306–>即mysql默认绑定localhost,远程访问不了
*如果是绑定了127.0.0.1则继续看第三步,否则请跳过第三步
三、修改mysql配置文件,将bind-address = 127.0.0.1注释,开放所有连接
- 1
重启ubuntu,再次查看3306端口状态,同第二步
四、通过telnet尝试连接mysql
- 1
如果不能连通,继续下一步
五、将root用户授权给所有连接
step1:进入mysql
step2:
法一>改表法:进入mysql数据库,查看里面user表,搜索User=’root’的记录
注:此处为修改后的记录
修改Host=’localhost’的记录:
- 1
使修改生效:
- 1
法二>授权法:
例子:允许root用户使用密码password从任何主机连接到mysql:
- 1
使修改生效:
- 1
最后,可再通过第四步进行测试验证能否远程连接上mysql~
阅读全文
0 0
- Ubuntu远程连接MySQL(connection refused)解决方法
- Ubuntu远程连接MySQL(connection refused)解决方法
- 远程连接 ssdb connection refused
- 连接Ubuntu系统服务器Mysql出错(错误:10061)/Jdbc连接远程数据库出错(java.net.ConnectException: Connection refused: connect)
- 连接Ubuntu系统服务器Mysql出错(错误:10061)/Jdbc连接远程数据库出错(java.net.ConnectException: Connection refused: connect)
- 用putty 远程登录Ubuntu时 显示network error connection refused 解决方法 (学习记录)
- Ubuntu下MySQL不能连接问题的解决 MESSAGE: java.net.ConnectException: Connection refused
- kettle连接sqlserver2005报Connection refused: connect解决方法
- PUTTY连接虚拟机linux,出现connection refused的解决方法!
- putty连接虚拟机里的ubuntu,提示说connection refused
- secureCRT连接ubuntu问题- The remote system refused the connection
- secureCRT连接ubuntu问题- The remote system refused the connection
- secureCRT连接ubuntu问题- The remote system refused the connection
- secureCRT连接ubuntu问题- The remote system refused the connection
- SSH连接Ubuntu虚拟机失败:The remote system refused connection
- SecureCRT连接ubuntu提示The remote system refused the connection.
- mysql数据库总是连接失败,Warning:mysql_connect() :Connection refused...
- 阿里云ubuntu下mysql远程连接失败解决方法
- 手写死锁
- 解决在eclipse中删除tomcat server后导致无法重新添加服务器的问题
- ubuntu下忘记mysql密码
- mysql could not read contents of failed to open no such file or directory
- LeetCode-2-Add Two Nuns(C语言实现)
- Ubuntu远程连接MySQL(connection refused)解决方法
- 使用Spring Data Redis操作Redis(一) 很全面
- Redis之——jedis高版本的JedisPoolConfig没有maxActive和maxWait
- 使用springbootdatajpa遇到的性能相关问题
- 在LLVM中编写pass的详细教程(4)
- Reinforcement Learning Note: Concept and MDP
- 机器是否会取代人类工作
- LeetCode: Merge Two Sorted Lists, Remove Duplicates/Element, strStr()
- Linux下编译安装redis,详细教程