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
相关推荐
小句3 小时前
MySQL慢查询日志详细使用指南
数据库·mysql·adb
码农水水4 小时前
中国邮政Java面试被问:容器镜像的多阶段构建和优化
java·linux·开发语言·数据库·mysql·面试·php
软件资深者6 小时前
全能图片缩略图显示工具,体积较大,直接显示AI,PSD,EPS,PDF,INDD,TIFF,CR2,RAW等格式缩略图的图像解码包
windows·microsoft·pdf·windows11·系统修复
酉鬼女又兒10 小时前
SQL21 浙江大学用户题目回答情况
数据库·sql·mysql
chinesegf10 小时前
Windows 系统中通过 Conda 「克隆」环境
windows·conda
C++ 老炮儿的技术栈10 小时前
不调用C++/C的字符串库函数,编写函数strcmp
c语言·开发语言·c++·人工智能·windows·git·visual studio
wangmengxxw11 小时前
SpringAI-mysql
java·数据库·人工智能·mysql·springai
小新软件园11 小时前
PrintPage 打印 绿色版发票打印工具 批量打印 多维度设置更实用
windows·电脑·开源软件
luyun02020212 小时前
PDF神仙工具,批量处理
windows·pdf·figma
软件资深者12 小时前
win系统治理流氓软件、弹窗广告 +清理软件工具集合体
windows·microsoft·windows11·系统修复