ERROR 2003 (HY000): Can't connect to MySQL server on '129.28.149.240' (111) mysql 无法远程连接
2023-09-27 14:23:50 时间
环境: ubuntu mysql
一. 查看端口
可以看到mysql监控的是本机Ip
root@jiang:/etc/mysql/mysql.conf.d# netstat -apn|grep 3306
tcp 0 127 0.0.0.1:3306 0.0.0.0:* LISTEN 12770/mysqld
二. 修改mysql 配置文件
将bind-address = 127.0.0.1 # 表示允许任何主机登陆MySQL port=3306 改为
bind-address = 0.0.0.0 # 表示允许任何主机登陆MySQL
三. 重启mysql
sudo service mysql restart
四. 远程连接成功
jiang@jiang:~$ mysql -h 106.13.46.152 -u jiang -p1 -P 3306 mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g.
相关文章
- MYSQL导入CSV格式文件数据执行提示错误(ERROR 1290): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement.
- 一次 MySQL 索引面试,被面试官怼的体无完肤!
- (HY000): Can't connect to MySQL server on '129.28.149.240' (113)
- Mysql连接错误:Lost connection to Mysql server at 'waiting for initial communication packet'
- 如何解决远程连接mysql出现Can’t connect to MySQL server on (111 “Connection refused”)的问题
- MyCLI :一个支持自动补全和语法高亮的 MySQL/MariaDB 客户端
- MySQL delete和truncate
- 2022-09-07 mysql/stonedb-查询优化器逻辑记录及优化器魔改
- mysql server_id重复导致的错误
- MySQL error Query execution was interrupted, maximum statement execution time exceeded
- mysql导入sql文件过大或连接超时的解决的方法
- The server quit without updating PID file (/usr/local/mysql/data/localhost.pid).
- lightdb/postgresql/oracle/mysql/sql server中各自绑定变量的写法