Get the App
SLTechnology News&Howtos  ›  Database  › 

Bin-log and mysql configuration handouts

Shulou Source: shulou.com Published: 2022-06-01 20:31:45 10月25日 Update

This article mainly introduces bin-log and mysql configuration handouts, hoping to supplement and update some knowledge. If you have any other questions you need to know, you can continue to follow my updated article in the industry information.

1. Configure the environment:

OS:Win10

Mysql:5.7.19

2. My Mysql configuration file (my.ini) is as follows:

[client] port=3306default-character-set=utf8 [mysqld] # Path to install software directory basedir=E:\ mysql-5.7.19#Path to the database directorydatadir=G:\ mysql_data#Port Numberport=3306#created and no character set is definedcharacter_set_server=utf8#Set the SQL mode to strictsql_mode= "NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER STRICT_TRANS_TABLES "explicit_defaults_for_timestamp=true# Binary Logginglog-bin=mysql-binbinlog-format=Row#The default storage engine that will be used when create new tables whendefault-storage-engine=INNODB#General and Slow logginglog-output=FILEgeneral-log=0general_log_file=" yuri.log "slow-query-log=1slow_query_log_file=" yuri-slow.log "long_query_time=10#Error Logginglog-error=" yuri.err "# Server IDserver-id=201609

Note:

In MySQL 5.7.3 and later, if server-id is not set, the MySQL service cannot be started after setting binlog. (Bug # 11763963, Bug # 56739)

Another way to configure:

# log_bin=ON#log_bin_basename=G:\ mysql_data\ mysql-bin#log_bin_index=G:\ mysql_data\ mysql-bin.index

But by default, it's like this.

The meaning of the three parameters:

1. The parameter is to open binlog log.

2. The parameter is the basic file name of the binlog log, followed by an identification to indicate each file.

3. The parameter specifies the index file of the binlog file, which manages the directory of all binlog files

Start the mysql test and check whether it looks successful, as shown in the following figure

Show variables like'% log_bin%'

Read the above about bin-log and mysql configuration handouts, hope to give you some help in practical application. Due to the limited space in this article, it is inevitable that there will be deficiencies and need to be supplemented. If you need more professional answers, you can contact us on the official website for 24-hour pre-sales and after-sales to help you answer questions at any time.

Tags: File configuration parameters handout success log question update answer three professional available in meaning place remarks actual hour file name article method Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Huawei MariaDB Xiaomi Shulou Technology