Test MySQL replication 1 PC 2 serivce3305 3307 1 wsl ubuntu 3306

Mysql闪退C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe mysql:[Warning]C:\ProgramFiles\MySQL\MySQLServer8.0\bin\mysql.exe:ignoringoption‘–no-beep’duetoinvalidvalue‘’.** 阅读详情

"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld" --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my3307.ini" MySQL

"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" SQL80

C:\ProgramData\MySQL\MySQL Server 8.0\my.ini

My.ini

# Other default tuning values

# MySQL Server Instance Configuration File

# ----------------------------------------------------------------------

# Generated by the MySQL Server Instance Configuration Wizard

#

#

# Installation Instructions

# ----------------------------------------------------------------------

#

# On Linux you can copy this file to /etc/my.cnf to set global options,

# mysql-data-dir/my.cnf to set server-specific options

# (@localstatedir@ for this installation) or to

# ~/.my.cnf to set user-specific options.

#

# On Windows you should keep this file in the installation directory

# of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To

# make sure the server reads the config file use the startup option

# "--defaults-file".

#

# To run the server from the command line, execute this in a

# command line shell, e.g.

# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"

#

# To install the server as a Windows service manually, execute this in a

# command line shell, e.g.

# mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"

#

# And then execute this in a command line shell to start the server, e.g.

# net start MySQLXY

#

#

# Guidelines for editing this file

# ----------------------------------------------------------------------

#

# In this file, you can use all long options that the program supports.

# If you want to know the options a program supports, start the program

# with the "--help" option.

#

# More detailed information about the individual options can also be

# found in the manual.

#

# For advice on how to change settings please see

# https://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html

#

#

# CLIENT SECTION

# ----------------------------------------------------------------------

#

# The following options will be read by MySQL client applications.

# Note that only client applications shipped by MySQL are guaranteed

# to read this section. If you want your own MySQL client program to

# honor these values, you need to specify it as an option during the

# MySQL client library initialization.

#

[client]

# pipe=

# socket=MYSQL

port=3305

[mysql]

no-beep

# default-character-set=

# SERVER SECTION

# ----------------------------------------------------------------------

#

# The following options will be read by the MySQL Server. Make sure that

# you have installed the server correctly (see above) so it reads this

# file.

#

# server_type=3

[mysqld]

# The next three options are mutually exclusive to SERVER_PORT below.

# skip-networking

# enable-named-pipe

# shared-memory

bind-address = 0.0.0.0

# shared-memory-base-name=MYSQL

# The Pipe the MySQL Server will use

# socket=MYSQL

# The TCP/IP Port the MySQL Server will listen on

port=3305

# Path to installation directory. All paths are usually resolved relative to this.

# basedir="C:/Program Files/MySQL/MySQL Server 8.0/"

# Path to the database root

datadir=C:/ProgramData/MySQL/MySQL Server 8.0/Data

# The default character set that will be used when a new schema or table is

# created and no character set is defined

# character-set-server=utf8mb4

# The default authentication plugin to be used when connecting to the server

default_authentication_plugin=caching_sha2_password

# The default storage engine that will be used when create new tables when

default-storage-engine=INNODB

# Set the SQL mode to strict

sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"

# General and Slow logging.

log-output=FILE

general-log=0

general_log_file="DI2L3M6KL2.log"

slow-query-log=1

slow_query_log_file="DI2L3M6KL2-slow.log"

long_query_time=10

# Binary Logging.

log-bin="DI2L3M6KL2-bin"

# Error Logging.

log-error="DI2L3M6KL2.err"

# Server Id.

server-id=3305

# Indicates how table and database names are stored on disk and used in MySQL.

# Value = 0: Table and database names are stored on disk using the lettercase specified in the

#            CREATE TABLE or CREATE DATABASE statement. Name comparisons are case sensitive.

#            You should not set this variable to 0 if you are running MySQL on a system that has

#            case-insensitive file names (such as Windows or macOS).

# Value = 1: Table names are stored in lowercase on disk and name comparisons are not

#            case-sensitive. MySQL converts all table names to lowercase on storage and lookup.

#            This behavior also applies to database names and table aliases.

# Value = 3, Table and database names are stored on disk using the lettercase specified in the

#            CREATE TABLE or CREATE DATABASE statement, but MySQL converts them to lowercase on

#            lookup. Name comparisons are not case sensitive. This works only on file systems

#            that are not case-sensitive! InnoDB table names and view names are stored in

#            lowercase, as for Value = 1.

# NOTE: lower_case_table_names can only be configured when initializing the server.

#       Changing the lower_case_table_names setting after the server is initialized is prohibited.

lower_case_table_names=1

# Secure File Priv.

secure-file-priv="C:/ProgramData/MySQL/MySQL Server 8.0/Uploads"

# The maximum amount of concurrent sessions the MySQL server will

# allow. One of these connections will be reserved for a user with

# SUPER privileges to allow the administrator to login even if the

# connection limit has been reached.

max_connections=151

# The number of open tables for all threads. Increasing this value

# increases the number of file descriptors that mysqld requires.

# Therefore you have to make sure to set the amount of open files

# allowed to at least 4096 in the variable "open-files-limit" in

# section [mysqld_safe]

table_open_cache=2000

# Maximum size for internal (in-memory) temporary tables. If a table

# grows larger than this value, it is automatically converted to disk

# based table This limitation is for a single table. There can be many

# of them.

tmp_table_size=33M

# How many threads we should keep in a cache for reuse. When a client

# disconnects, the client's threads are put in the cache if there aren't

# more than thread_cache_size threads from before.  This greatly reduces

# the amount of thread creations needed if you have a lot of new

# connections. (Normally this doesn't give a notable performance

# improvement if you have a good thread implementation.)

thread_cache_size=10

#*** MyISAM Specific options

# The maximum size of the temporary file MySQL is allowed to use while

# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.

# If the file-size would be bigger than this, the index will be created

# through the key cache (which is slower).

myisam_max_sort_file_size=100G

# If the temporary file used for fast index creation would be bigger

# than using the key cache by the amount specified here, then prefer the

# key cache method.  This is mainly used to force long character keys in

# large tables to use the slower key cache method to create the index.

myisam_sort_buffer_size=58M

# Size of the Key Buffer, used to cache index blocks for MyISAM tables.

# Do not set it larger than 30% of your available memory, as some memory

# is also required by the OS to cache rows. Even if you're not using

# MyISAM tables, you should still set it to 8-64M as it will also be

# used for internal temporary disk tables.

key_buffer_size=8M

# Size of the buffer used for doing full table scans of MyISAM tables.

# Allocated per thread, if a full scan is needed.

read_buffer_size=64K

read_rnd_buffer_size=256K

#*** INNODB Specific options ***

# innodb_data_home_dir=

# Use this option if you have a MySQL server with InnoDB support enabled

# but you do not plan to use it. This will save memory and disk space

# and speed up some things.

# skip-innodb

# If set to 1, InnoDB will flush (fsync) the transaction logs to the

# disk at each commit, which offers full ACID behavior. If you are

# willing to compromise this safety, and you are running small

# transactions, you may set this to 0 or 2 to reduce disk I/O to the

# logs. Value 0 means that the log is only written to the log file and

# the log file flushed to disk approximately once per second. Value 2

# means the log is written to the log file at each commit, but the log

# file is only flushed to disk approximately once per second.

innodb_flush_log_at_trx_commit=1

# The size of the buffer InnoDB uses for buffering log data. As soon as

# it is full, InnoDB will have to flush it to disk. As it is flushed

# once per second anyway, it does not make sense to have it very large

# (even with long transactions).

innodb_log_buffer_size=1M

# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and

# row data. The bigger you set this the less disk I/O is needed to

# access data in tables. On a dedicated database server you may set this

# parameter up to 80% of the machine physical memory size. Do not set it

# too large, though, because competition of the physical memory may

# cause paging in the operating system.  Note that on 32bit systems you

# might be limited to 2-3.5G of user level memory per process, so do not

# set it too high.

innodb_buffer_pool_size=8M

# Size of each log file in a log group. You should set the combined size

# of log files to about 25%-100% of your buffer pool size to avoid

# unneeded buffer pool flush activity on log file overwrite. However,

# note that a larger logfile size will increase the time needed for the

# recovery process.

innodb_log_file_size=48M

# Number of threads allowed inside the InnoDB kernel. The optimal value

# depends highly on the application, hardware as well as the OS

# scheduler properties. A too high value may lead to thread thrashing.

innodb_thread_concurrency=25

# The increment size (in MB) for extending the size of an auto-extend InnoDB system tablespace file when it becomes full.

innodb_autoextend_increment=64

# The number of regions that the InnoDB buffer pool is divided into.

# For systems with buffer pools in the multi-gigabyte range, dividing the buffer pool into separate instances can improve concurrency,

# by reducing contention as different threads read and write to cached pages.

innodb_buffer_pool_instances=8

# Determines the number of threads that can enter InnoDB concurrently.

innodb_concurrency_tickets=5000

# Specifies how long in milliseconds (ms) a block inserted into the old sublist must stay there after its first access before

# it can be moved to the new sublist.

innodb_old_blocks_time=1000

# It specifies the maximum number of .ibd files that MySQL can keep open at one time. The minimum value is 10.

innodb_open_files=300

# When this variable is enabled, InnoDB updates statistics during metadata statements.

innodb_stats_on_metadata=0

# When innodb_file_per_table is enabled (the default in 5.6.6 and higher), InnoDB stores the data and indexes for each newly created table

# in a separate .ibd file, rather than in the system tablespace.

innodb_file_per_table=1

# Use the following list of values: 0 for crc32, 1 for strict_crc32, 2 for innodb, 3 for strict_innodb, 4 for none, 5 for strict_none.

innodb_checksum_algorithm=0

# The number of outstanding connection requests MySQL can have.

# This option is useful when the main MySQL thread gets many connection requests in a very short time.

# It then takes some time (although very little) for the main thread to check the connection and start a new thread.

# The back_log value indicates how many requests can be stacked during this short time before MySQL momentarily

# stops answering new requests.

# You need to increase this only if you expect a large number of connections in a short period of time.

back_log=80

# If this is set to a nonzero value, all tables are closed every flush_time seconds to free up resources and

# synchronize unflushed data to disk.

# This option is best used only on systems with minimal resources.

flush_time=0

# The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use

# indexes and thus perform full table scans.

join_buffer_size=256K

# The maximum size of one packet or any generated or intermediate string, or any parameter sent by the

# mysql_stmt_send_long_data() C API function.

max_allowed_packet=4M

# If more than this many successive connection requests from a host are interrupted without a successful connection,

# the server blocks that host from performing further connections.

max_connect_errors=100

# Changes the number of file descriptors available to mysqld.

# You should try increasing the value of this option if mysqld gives you the error "Too many open files".

open_files_limit=4161

# If you see many sort_merge_passes per second in SHOW GLOBAL STATUS output, you can consider increasing the

# sort_buffer_size value to speed up ORDER BY or GROUP BY operations that cannot be improved with query optimization

# or improved indexing.

sort_buffer_size=256K

# The number of table definitions (from .frm files) that can be stored in the definition cache.

# If you use a large number of tables, you can create a large table definition cache to speed up opening of tables.

# The table definition cache takes less space and does not use file descriptors, unlike the normal table cache.

# The minimum and default values are both 400.

table_definition_cache=1400

# Specify the maximum size of a row-based binary log event, in bytes.

# Rows are grouped into events smaller than this size if possible. The value should be a multiple of 256.

binlog_row_event_max_size=8K

# If the value of this variable is greater than 0, a replication slave synchronizes its master.info file to disk.

# (using fdatasync()) after every sync_master_info events.

sync_master_info=10000

# If the value of this variable is greater than 0, the MySQL server synchronizes its relay log to disk.

# (using fdatasync()) after every sync_relay_log writes to the relay log.

sync_relay_log=10000

# If the value of this variable is greater than 0, a replication slave synchronizes its relay-log.info file to disk.

# (using fdatasync()) after every sync_relay_log_info transactions.

sync_relay_log_info=10000

# Load mysql plugins at start."plugin_x ; plugin_y".

# plugin_load

# The TCP/IP Port the MySQL Server X Protocol will listen on.

loose_mysqlx_port=33050

binlog-do-db=db1

gtid_mode=ON

enforce-gtid-consistency=ON

C:\ProgramData\MySQL\MySQL Server 8.0\my3307.ini

my3307.ini

# Other default tuning values

# MySQL Server Instance Configuration File

# ----------------------------------------------------------------------

# Generated by the MySQL Server Instance Configuration Wizard

#

#

# Installation Instructions

# ----------------------------------------------------------------------

#

# On Linux you can copy this file to /etc/my.cnf to set global options,

# mysql-data-dir/my.cnf to set server-specific options

# (@localstatedir@ for this installation) or to

# ~/.my.cnf to set user-specific options.

#

# On Windows you should keep this file in the installation directory

# of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To

# make sure the server reads the config file use the startup option

# "--defaults-file".

#

# To run the server from the command line, execute this in a

# command line shell, e.g.

# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"

#

# To install the server as a Windows service manually, execute this in a

# command line shell, e.g.

# mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"

#

# And then execute this in a command line shell to start the server, e.g.

# net start MySQLXY

#

#

# Guidelines for editing this file

# ----------------------------------------------------------------------

#

# In this file, you can use all long options that the program supports.

# If you want to know the options a program supports, start the program

# with the "--help" option.

#

# More detailed information about the individual options can also be

# found in the manual.

#

# For advice on how to change settings please see

# https://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html

#

#

# CLIENT SECTION

# ----------------------------------------------------------------------

#

# The following options will be read by MySQL client applications.

# Note that only client applications shipped by MySQL are guaranteed

# to read this section. If you want your own MySQL client program to

# honor these values, you need to specify it as an option during the

# MySQL client library initialization.

#

[client]

# pipe=

# socket=MYSQL

port=3307

[mysql]

no-beep

# default-character-set=

default-character-set=utf8mb4

# SERVER SECTION

# ----------------------------------------------------------------------

#

# The following options will be read by the MySQL Server. Make sure that

# you have installed the server correctly (see above) so it reads this

# file.

#

# server_type=3

[mysqld]

# The next three options are mutually exclusive to SERVER_PORT below.

# skip-networking

# enable-named-pipe

# shared-memory

bind-address = 0.0.0.0

# shared-memory-base-name=MYSQL

# The Pipe the MySQL Server will use

# socket=MYSQL

# The TCP/IP Port the MySQL Server will listen on

port=3307

# Path to installation directory. All paths are usually resolved relative to this.

# basedir="C:/Program Files/MySQL/MySQL Server 8.0/"

# Path to the database root

datadir=C:/ProgramData/MySQL/MySQL Server 8.0/Data3307

# The default character set that will be used when a new schema or table is

# created and no character set is defined

# character-set-server=utf8mb4

# The default authentication plugin to be used when connecting to the server

default_authentication_plugin=caching_sha2_password

# The default storage engine that will be used when create new tables when

default-storage-engine=INNODB

# Set the SQL mode to strict

sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"

# General and Slow logging.

log-output=FILE

general-log=0

general_log_file="DI2L3M6KL2.log"

slow-query-log=1

slow_query_log_file="DI2L3M6KL2-slow.log"

long_query_time=10

# Binary Logging.

log-bin="DI2L3M6KL2-bin"

# Error Logging.

log-error="DI2L3M6KL2.err"

# Server Id.

server-id=2

# Indicates how table and database names are stored on disk and used in MySQL.

# Value = 0: Table and database names are stored on disk using the lettercase specified in the

#            CREATE TABLE or CREATE DATABASE statement. Name comparisons are case sensitive.

#            You should not set this variable to 0 if you are running MySQL on a system that has

#            case-insensitive file names (such as Windows or macOS).

# Value = 1: Table names are stored in lowercase on disk and name comparisons are not

#            case-sensitive. MySQL converts all table names to lowercase on storage and lookup.

#            This behavior also applies to database names and table aliases.

# Value = 3, Table and database names are stored on disk using the lettercase specified in the

#            CREATE TABLE or CREATE DATABASE statement, but MySQL converts them to lowercase on

#            lookup. Name comparisons are not case sensitive. This works only on file systems

#            that are not case-sensitive! InnoDB table names and view names are stored in

#            lowercase, as for Value = 1.

# NOTE: lower_case_table_names can only be configured when initializing the server.

#       Changing the lower_case_table_names setting after the server is initialized is prohibited.

lower_case_table_names=1

# Secure File Priv.

secure-file-priv="C:/ProgramData/MySQL/MySQL Server 8.0/Uploads"

# The maximum amount of concurrent sessions the MySQL server will

# allow. One of these connections will be reserved for a user with

# SUPER privileges to allow the administrator to login even if the

# connection limit has been reached.

max_connections=151

# The number of open tables for all threads. Increasing this value

# increases the number of file descriptors that mysqld requires.

# Therefore you have to make sure to set the amount of open files

# allowed to at least 4096 in the variable "open-files-limit" in

# section [mysqld_safe]

table_open_cache=2000

# Maximum size for internal (in-memory) temporary tables. If a table

# grows larger than this value, it is automatically converted to disk

# based table This limitation is for a single table. There can be many

# of them.

tmp_table_size=33M

# How many threads we should keep in a cache for reuse. When a client

# disconnects, the client's threads are put in the cache if there aren't

# more than thread_cache_size threads from before.  This greatly reduces

# the amount of thread creations needed if you have a lot of new

# connections. (Normally this doesn't give a notable performance

# improvement if you have a good thread implementation.)

thread_cache_size=10

#*** MyISAM Specific options

# The maximum size of the temporary file MySQL is allowed to use while

# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.

# If the file-size would be bigger than this, the index will be created

# through the key cache (which is slower).

myisam_max_sort_file_size=100G

# If the temporary file used for fast index creation would be bigger

# than using the key cache by the amount specified here, then prefer the

# key cache method.  This is mainly used to force long character keys in

# large tables to use the slower key cache method to create the index.

myisam_sort_buffer_size=58M

# Size of the Key Buffer, used to cache index blocks for MyISAM tables.

# Do not set it larger than 30% of your available memory, as some memory

# is also required by the OS to cache rows. Even if you're not using

# MyISAM tables, you should still set it to 8-64M as it will also be

# used for internal temporary disk tables.

key_buffer_size=8M

# Size of the buffer used for doing full table scans of MyISAM tables.

# Allocated per thread, if a full scan is needed.

read_buffer_size=64K

read_rnd_buffer_size=256K

#*** INNODB Specific options ***

# innodb_data_home_dir=

# Use this option if you have a MySQL server with InnoDB support enabled

# but you do not plan to use it. This will save memory and disk space

# and speed up some things.

# skip-innodb

# If set to 1, InnoDB will flush (fsync) the transaction logs to the

# disk at each commit, which offers full ACID behavior. If you are

# willing to compromise this safety, and you are running small

# transactions, you may set this to 0 or 2 to reduce disk I/O to the

# logs. Value 0 means that the log is only written to the log file and

# the log file flushed to disk approximately once per second. Value 2

# means the log is written to the log file at each commit, but the log

# file is only flushed to disk approximately once per second.

innodb_flush_log_at_trx_commit=1

# The size of the buffer InnoDB uses for buffering log data. As soon as

# it is full, InnoDB will have to flush it to disk. As it is flushed

# once per second anyway, it does not make sense to have it very large

# (even with long transactions).

innodb_log_buffer_size=1M

# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and

# row data. The bigger you set this the less disk I/O is needed to

# access data in tables. On a dedicated database server you may set this

# parameter up to 80% of the machine physical memory size. Do not set it

# too large, though, because competition of the physical memory may

# cause paging in the operating system.  Note that on 32bit systems you

# might be limited to 2-3.5G of user level memory per process, so do not

# set it too high.

innodb_buffer_pool_size=8M

# Size of each log file in a log group. You should set the combined size

# of log files to about 25%-100% of your buffer pool size to avoid

# unneeded buffer pool flush activity on log file overwrite. However,

# note that a larger logfile size will increase the time needed for the

# recovery process.

innodb_log_file_size=48M

# Number of threads allowed inside the InnoDB kernel. The optimal value

# depends highly on the application, hardware as well as the OS

# scheduler properties. A too high value may lead to thread thrashing.

innodb_thread_concurrency=25

# The increment size (in MB) for extending the size of an auto-extend InnoDB system tablespace file when it becomes full.

innodb_autoextend_increment=64

# The number of regions that the InnoDB buffer pool is divided into.

# For systems with buffer pools in the multi-gigabyte range, dividing the buffer pool into separate instances can improve concurrency,

# by reducing contention as different threads read and write to cached pages.

innodb_buffer_pool_instances=8

# Determines the number of threads that can enter InnoDB concurrently.

innodb_concurrency_tickets=5000

# Specifies how long in milliseconds (ms) a block inserted into the old sublist must stay there after its first access before

# it can be moved to the new sublist.

innodb_old_blocks_time=1000

# It specifies the maximum number of .ibd files that MySQL can keep open at one time. The minimum value is 10.

innodb_open_files=300

# When this variable is enabled, InnoDB updates statistics during metadata statements.

innodb_stats_on_metadata=0

# When innodb_file_per_table is enabled (the default in 5.6.6 and higher), InnoDB stores the data and indexes for each newly created table

# in a separate .ibd file, rather than in the system tablespace.

innodb_file_per_table=1

# Use the following list of values: 0 for crc32, 1 for strict_crc32, 2 for innodb, 3 for strict_innodb, 4 for none, 5 for strict_none.

innodb_checksum_algorithm=0

# The number of outstanding connection requests MySQL can have.

# This option is useful when the main MySQL thread gets many connection requests in a very short time.

# It then takes some time (although very little) for the main thread to check the connection and start a new thread.

# The back_log value indicates how many requests can be stacked during this short time before MySQL momentarily

# stops answering new requests.

# You need to increase this only if you expect a large number of connections in a short period of time.

back_log=80

# If this is set to a nonzero value, all tables are closed every flush_time seconds to free up resources and

# synchronize unflushed data to disk.

# This option is best used only on systems with minimal resources.

flush_time=0

# The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use

# indexes and thus perform full table scans.

join_buffer_size=256K

# The maximum size of one packet or any generated or intermediate string, or any parameter sent by the

# mysql_stmt_send_long_data() C API function.

max_allowed_packet=4M

# If more than this many successive connection requests from a host are interrupted without a successful connection,

# the server blocks that host from performing further connections.

max_connect_errors=100

# Changes the number of file descriptors available to mysqld.

# You should try increasing the value of this option if mysqld gives you the error "Too many open files".

open_files_limit=4161

# If you see many sort_merge_passes per second in SHOW GLOBAL STATUS output, you can consider increasing the

# sort_buffer_size value to speed up ORDER BY or GROUP BY operations that cannot be improved with query optimization

# or improved indexing.

sort_buffer_size=256K

# The number of table definitions (from .frm files) that can be stored in the definition cache.

# If you use a large number of tables, you can create a large table definition cache to speed up opening of tables.

# The table definition cache takes less space and does not use file descriptors, unlike the normal table cache.

# The minimum and default values are both 400.

table_definition_cache=1400

# Specify the maximum size of a row-based binary log event, in bytes.

# Rows are grouped into events smaller than this size if possible. The value should be a multiple of 256.

binlog_row_event_max_size=8K

# If the value of this variable is greater than 0, a replication slave synchronizes its master.info file to disk.

# (using fdatasync()) after every sync_master_info events.

sync_master_info=10000

# If the value of this variable is greater than 0, the MySQL server synchronizes its relay log to disk.

# (using fdatasync()) after every sync_relay_log writes to the relay log.

sync_relay_log=10000

# If the value of this variable is greater than 0, a replication slave synchronizes its relay-log.info file to disk.

# (using fdatasync()) after every sync_relay_log_info transactions.

sync_relay_log_info=10000

# Load mysql plugins at start."plugin_x ; plugin_y".

# plugin_load

# The TCP/IP Port the MySQL Server X Protocol will listen on.

loose_mysqlx_port=33050

replicate_do_db=db1

gtid_mode=ON

enforce-gtid-consistency=ON

slave_skip_errors=1062,1053  

#slave_skip_errors=all  

slave_skip_errors=ddl_exist_errors 

vagrant@di2l3m6kl2:/etc/mysql/mysql.conf.d$ sudo cat mysqld.cnf

/etc/mysql/mysql.conf.d /mysqld.cnf

#

# 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            = 0.0.0.0

mysqlx-bind-address     = 0.0.0.0

#

# * 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          = db1

# binlog_ignore_db      = include_database_name

replicate_do_db=db1

gtid_mode=ON

enforce-gtid-consistency=ON

slave_skip_errors=1062,1053  

#slave_skip_errors=all  

slave_skip_errors=ddl_exist_errors  

STM32F407+LWIP实战:NETCONN接口TCP服务器避坑指南(附正点原子例程解析) 本文深入解析了基于STM32F407和LWIP协议栈构建高响应TCP服务器的实战要点。针对使用NETCONN接口时常见的连接不稳定、数据延迟及内存泄漏等问题,提供了从NETCONN运行模型、服务器实现、参数优化到内存管理的全方位避坑指南,并结合正点原子例程,给出了具体的调试技巧与解决方案。 阅读详情

相关推荐

NVIDIA Isaac Lab 入门教程(一)

Isaac Lab 是一个用于机器人学习的统一模块化框架,旨在简化机器人研究中的常见工作流程(如 RL、从演示中学习和运动规划)。它建立在英伟达 Isaac Sim 的基础上,利用最新的仿真功能实现逼真的场景和快速高效的仿真。该框架的核心目标是Isaac Lab 的主要功能包括:由 PhysX 提供的快速准确的物理模拟、用于矢量化渲染的平铺渲染 API、用于提高鲁棒性和适应性的域随机化,以及对在云中运行的支持。有关该框架的更多信息,请参阅论文[MYY+23]。

机器人控制与仿真应用 8150

Windows10安装Mysql 8.0数据库提示服务无法启动的终极解决办法和根本原因

1、在MySQL数据库安装时选择过MySQL服务器随系统启动,但如果没有选择,也没关系,可以在可以在Windows服务管理器启动,具体在开始菜单搜索services.msc, 2、单击出现如下图窗口,下滑鼠标找到MySQL57: 3、右击后点击启动,MySQL57旁边状态列显示“已启动”字样,说明启动成功。如下图: ...

学习·交流 3万+

基于RAG与多智能体协同架构的心内科疾病智能诊断系统开发项目_该项目旨在构建一个集成检索增强生成技术与多智能体协作框架的专门针对心内科疾病进行自动化诊断分析的医疗人工智能系统_通过.zip

基于RAG与多智能体协同架构的心内科疾病智能诊断系统开发项目_该项目旨在构建一个集成检索增强生成技术与多智能体协作框架的专门针对心内科疾病进行自动化诊断分析的医疗人工智能系统_通过.zip

Mysql修改配置文件后,Mysql启动不了怎么解决

一、Mysql修改配置文件后,Mysql启动不了 今天下午为了解决mysql的xxx问题,需要修改my.ini文件,然后将mysql重启即可。但是我修改my.ini文件后,myql再也无法启动。 1、网上找了好几个解决方法,最大的可能性是1、数据有问题。2、配置文件有问题。 2、鉴于我是刚修改过my.ini,所以猜测应该是它出了故障。通过排查,发现我的my.ini编码格式不知道为什么变成了utf-8,可能是我修改参数时里面包含了utf-8格式的内容,所以系统自动将文件改了编码格式。 3、解决方法: 将my.

weixin_45580903的博客 7591

mysql 5.7.4 my.ini 示例

# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the

旗木卡卡西的专栏 7401

Win10 安装配置 MySQL8.0 时遇到的问题及解决方法

在本地安装mysql8.0社区版之后,遇到了三个问题: MySQL 8.0 Command Line Client 双击打开时闪退。 使用Sqlyog连接数据库时提示2058或2059错误。 Pycharm连接MySQL时报错,提示未设置数据库的时区或时区设置不正确。 现记录下这几个问题的解决办法。 问题1 MySQL 8.0 Command Line Client 和 MySQL 8.0 C...

Bossen的学习历程 2328

Windows更新后MySQL服务启动失败问题总结

由于 Windows 更新导致 MySQL登录各种报错 先后出现了 error 1: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) error 2: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) error 3: ERROR 2003 (HY000): Can't co

qq_43627529的博客 7032

MySQL 事务、四大隔离级别、MVCC完整原理笔记|案例+问题演示

本文完整讲解MySQL InnoDB事务全套核心知识点,从并发数据错乱问题引出事务概念,详解事务四大特性ACID底层实现原理:原子性依靠undo log、持久性依靠redo log、隔离性由锁+MVCC保障,一致性为最终状态由技术与业务代码共同实现。通过4组客户端宕机实操实验区分自动提交、显式/隐式事务提交与回滚机制。依次介绍四大隔离级别,脏读、不可重复读、幻读三类并发问题,深入拆解MVCC多版本并发控制、隐藏列、undo版本链、ReadView快照可见性规则,对比RC与RR隔离级别快照生成差异。

m0_68447088的博客 323

LeetCode //MySQL - 1204. Last Person to Fit in the Bus

This SQL query solves the problem of finding the last person who can board a bus without exceeding the 1000 kg weight limit. The solution involves: Calculating a running total of weights ordered by boarding turn using a window function Filtering to only in

Made in Code 366

MySQL 中的约束

MySQL约束类型及用法详解 摘要:MySQL提供多种约束类型来保证数据完整性和一致性,包括主键(PRIMARY KEY)、外键(FOREIGN KEY)、唯一(UNIQUE)、非空(NOT NULL)、检查(CHECK)和默认值(DEFAULT)约束。主键用于唯一标识记录,外键维护表间引用关系,唯一约束防止重复值,非空约束禁止NULL值,检查约束验证自定义条件,默认值约束提供默认数据。这些约束可在建表时定义或后期通过ALTER TABLE修改,支持列级和表级约束,并能设置级联操作。MySQL 8.0.16

梦想不只是梦与想的博客 295

MySQL 管理复制拓扑【MySQL第四课】

多线程(并行复制)从库:配置slave_parallel_workers开启,生成多个工作线程,可并发回放事务,加快同步速度。重置从库:执行RESET SLAVE,清除从库保存的主库连接、日志坐标等复制信息,断开和旧主库关联,用来重新配置复制环境。2.通过中继日志坐标、主库日志坐标,可以判断复制延迟。单线程从库:默认模式,只有 1 个 SQL 线程,串行执行中继日志里的事务,回放速度慢,容易产生复制延迟。3.Last_IO_Error、Last_SQL_Error可以查看 I/O、SQL 线程报错信息。

2602_96636859的博客 224

MySQL 事务入门详解:ACID 四大特性与完整事务实操演练

本文系统讲解了MySQL事务的核心概念与实操要点。首先通过火车票超卖案例引出事务的必要性,详细解析了ACID四大特性:原子性、一致性、隔离性和持久性。文章对比了InnoDB与MyISAM引擎对事务的支持差异,并演示了查看和修改事务提交方式的方法。通过完整的银行账户案例,逐步展示了事务的开启、保存点设置、回滚和提交操作,并设计多组实验验证了不同场景下(正常提交、异常崩溃)的事务行为特征。最后强调事务操作的注意事项,为理解并发事务问题奠定基础。全文理论结合实践,适合数据库学习者系统掌握事务基础。

2501_91275995的博客 228

MySQL 内置函数:日期函数、字符串函数、数学函数、其他函数

【代码】MySQL 内置函数:日期函数、字符串函数、数学函数、其他函数。

Wangshijie1015的博客 258

MySQL 5.7 在 CentOS 7 环境安装:从清理 MariaDB 到初始化与完善配置

MySQL 官方提供了适用于 Linux 系统的 Yum 存储库,这些存储库包含了预编译的 MySQL 软件包及其所有依赖项 为什么要使用 Yum 安装 MySQL? 自动解决依赖关系:Yum 会自动解析并安装 MySQL 运行所需的所有依赖库 版本管理便捷:可以直接通过 Yum 命令升级或降级 MySQL 版本 标准化配置:官方 Yum 源中的 MySQL 包已经针对特定 Linux 发行版进行了优化 2.2 下载 MySQL 官方 Yum 源 访问 MySQL 官方 Yum 存储库页面 MySQL 官方

枫亭湖区的博客 271

麒麟v10-MySQL InnoDB Cluster 完整部署与全场景验证(从入门到精通)

本文档详细记录了在 CentOS Kylin V10 系统上部署 MySQL InnoDB Cluster 的全过程,涵盖架构原理、环境清理、软件下载、安装配置等关键步骤。InnoDB Cluster 由 MySQL Server + MGR 插件、元数据库MySQL Shell 和 MySQL Router 四部分组成,提供高可用数据库服务。文档提供了三节点(192.168.195.141-143)的安装指南,包括 MySQL 8.0.35、MySQL Shell 8.0.35 和 MySQL Rout

Mico18的博客 258

MySQL 文件读写函数详解:从 CTF 实战到 LOAD_FILE、INTO OUTFILE、LOAD DATA INFILE 应用

读取服务器文件将查询结果写入文件将数据以原始形式写入文件将服务器文件中的数据导入表和 LOAD DATA INFILE类似,但重点区别是:LOCAL 表示数据文件来自客户端,而不是MySQL服务器。基本格式:文件路径表名;

2303_82039857的博客 241

Spring Boot 3 + Vue 3 全栈外卖系统:RabbitMQ异步解耦、MySQL/Neo4j双引擎推建

后端:Spring Boot 3.2.5 + MyBatis-Plus + Redis + RabbitMQ + Neo4j + 支付宝沙箱前端核心业务覆盖:用户注册登录、菜品浏览、购物车管理、下单结算、支付宝支付、订单状态实时同步、支付成功邮件通知等完整闭环。系统实现了基于用户行为的个性化推荐、基于图数据库的购物车共现推荐、以及基于消息队列的全链路异步解耦。

2303_79635409的博客 424

MySQL 核心知识体系:基础操作、索引原理与事务机制

本文系统介绍了SQL数据库操作的三大核心内容:1. 基础DML操作:包括增删改查四种基本操作,详细说明INSERT的三种语法、DELETE与TRUNCATE区别、UPDATE注意事项以及SELECT查询的完整执行流程和联表查询方式。2. 索引原理:重点分析B+树作为索引结构的优势,解释聚簇/二级索引的区别,介绍最左前缀原则、覆盖索引和索引下推等优化技术。3. 事务机制:阐述ACID四大特性及其实现原理,分析并发事务的三大问题,比较四种隔离级别的差异,特别说明MySQL在RR级别下通过MVCC和Next-Ke

c23856的博客 216

MySQL 索引失效全解析:从 B+ 树结构看透每一条规则的本质

失效场景破坏了 B+ 树的什么本质违反最左前缀排序链断裂,后续列全局无序找不到起点索引列函数/运算原始值有序 ≠ 计算后有序值域被改写LIKE 左模糊前缀未知,无法定位起始节点找不到起点OR 含非索引列需要全表扫描才能合并结果扫描成本反超隐式类型转换等价于对索引列加了 CAST 函数值域被改写索引失效的本质就是破坏了 B+ 树的有序性——要么找不到起点,要么排序链断裂,要么值域被改写,导致 MySQL 无法利用索引的快速定位能力,只能退化为全表扫描。

2301_79963518的博客 386

误删数据之后:MySQL、PostgreSQL、Oracle三库紧急恢复完全实操手册

《误删数据恢复手册:MySQL、PostgreSQL、Oracle三库紧急恢复实操》摘要: 本文针对数据库误删操作提供了一套30分钟内紧急恢复的SOP方案。首先分析了三种主流数据库删除操作的物理本质:MySQL标记删除记录,PostgreSQL标记死元组,Oracle保存UNDO镜像。关键恢复窗口可通过特定指标判断:MySQL的History list length、PostgreSQL的n_dead_tup和Oracle的tuned_undoretention。 针对MySQL提供三种恢复方案:1) 首选

渣渣盟的博客 80
上一篇: MySQL复制跳过错误--slave_skip_errors、sql_slave_skip_counter、slave_exec_mode
下一篇: HOW TO INTALL XFCE IN FREEBSD13
yangfree990
博客等级 码龄24年 0粉丝 · 2原创
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值