Windows SQLYog连接不上VMbox Ubuntu2204 的Mysql解决方法

Windows SQLYog连接不上VMbox Ubuntu2204 的Mysql解决方法

解决方法:

1、先检查以下mysql的端口状态

bash 复制代码
netstat -anp|grep mysql


如果显示127.0.0.1:3306 则说明需要修改,若为: : :3306,则不用。

在**/etc/mysql/mysql.conf.d/mysqld.cnf**,找到下面这部分,然后注释掉即可。

Instead of skip-networking the default is now to listen only on

localhost which is more compatible and is not less secure.

bind-address = 127.0.0.1

bash 复制代码
#

# The MySQL database server configuration file.

#

# One can use all long options that the program supports.

# Run program with --help to get a list of available options and with

# --print-defaults to see which it would actually understand and use.

#

# For explanations see

# http://dev.mysql.com/doc/mysql/en/server-system-variables.html



# Here is entries for some specific programs

# The following values assume you have at least 32M ram



[mysqld]

#

# * Basic Settings

#

user		= mysql

# pid-file	= /var/run/mysqld/mysqld.pid

# socket	= /var/run/mysqld/mysqld.sock

# port		= 3306

# datadir	= /var/lib/mysql





# If MySQL is running as a replication slave, this should be

# changed. Ref https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_tmpdir

# tmpdir		= /tmp

#

# Instead of skip-networking the default is now to listen only on

# localhost which is more compatible and is not less secure.

#bind-address		= 127.0.0.1

mysqlx-bind-address	= 127.0.0.1

#

# * Fine Tuning

#

key_buffer_size		= 16M

# max_allowed_packet	= 64M

# thread_stack		= 256K



# thread_cache_size       = -1



# This replaces the startup script and checks MyISAM tables if needed

# the first time they are touched

myisam-recover-options  = BACKUP



# max_connections        = 151



# table_open_cache       = 4000



#

# * Logging and Replication

#

# Both location gets rotated by the cronjob.

#

# Log all queries

# Be aware that this log type is a performance killer.

# general_log_file        = /var/log/mysql/query.log

# general_log             = 1

#

# Error log - should be very few entries.

#

log_error = /var/log/mysql/error.log

#

# Here you can see queries with especially long duration

# slow_query_log		= 1

# slow_query_log_file	= /var/log/mysql/mysql-slow.log

# long_query_time = 2

# log-queries-not-using-indexes

#

# The following can be used as easy to replay backup logs or for replication.

# note: if you are setting up a replication slave, see README.Debian about

#       other settings you may need to change.

# server-id		= 1

# log_bin			= /var/log/mysql/mysql-bin.log

# binlog_expire_logs_seconds	= 2592000

max_binlog_size   = 100M

# binlog_do_db		= include_database_name

# binlog_ignore_db	= include_database_name
相关推荐
阿白的白日梦14 小时前
winget基础管理---更新/修改源为国内源
windows
于眠牧北3 天前
MySQL的锁类型,表锁,行锁,MVCC中所使用的临键锁
mysql
Turnip12024 天前
深度解析:为什么简单的数据库"写操作"会在 MySQL 中卡住?
后端·mysql
埃博拉酱5 天前
VS Code Remote SSH 连接 Windows 服务器卡在"下载 VS Code 服务器":prcdn DNS 解析失败的诊断与 BITS 断点续传
windows·ssh·visual studio code
唐宋元明清21885 天前
.NET 本地Db数据库-技术方案选型
windows·c#
加号35 天前
windows系统下mysql多源数据库同步部署
数据库·windows·mysql
シ風箏5 天前
MySQL【部署 04】Docker部署 MySQL8.0.32 版本(网盘镜像及启动命令分享)
数据库·mysql·docker
tryCbest5 天前
Windows环境下配置pip镜像源
windows·pip
呉師傅5 天前
火狐浏览器报错配置文件缺失如何解决#操作技巧#
运维·网络·windows·电脑
WeiXin_DZbishe5 天前
基于django在线音乐数据采集的设计与实现-计算机毕设 附源码 22647
javascript·spring boot·mysql·django·node.js·php·html5