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


    Windows SQLYog连接不上VMbox Ubuntu2204 的Mysql解决方法
    解决方法:
    1、先检查以下mysql的端口状态

    netstat -anp|grep mysql
    
    • 1

    在这里插入图片描述
    如果显示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

    #
    
    # 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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155

    在这里插入图片描述

  • 相关阅读:
    win10打开Internet explorer浏览器访问网页
    高新技术企业认定中涉及的领域有哪些?
    多表查询以及外键约束
    [1173]regexp_replace()和regexp_substr()函数的用法
    PyTorch深度学习
    如果没有Google这个靠山,Go 凭什么火?
    IP代理中的动态轮换住宅代理是什么?有何作用?
    VLAN 综合实验
    【WPF应用31】WPF基本控件-ListView的详解与示例
    kafka 集群企业部署最佳实践
  • 原文地址:https://blog.csdn.net/yebichao/article/details/132608748