Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Summary of mariadb failure problems

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Failure 1: failure 1 encountered in the initial startup

[ERROR] InnoDB: auto-extending data file. / ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!

The cause of the problem:

The system automatically establishes several ibdata1,ib_logfile0,ib_logfile1 files when initializing the database.

Caused by the configuration of: innodb_data_file_path = ibdata1:10M;ibdata2:10M:autoextend in the configuration file, which is inconsistent with the size of the initialization ibdata1

The default ibdata1 size is 8m, while the one I configure here is 10m, which is the cause of the problem

Solution:

Under the data directory of mysql, delete ibdata1,ib_logfile0,ib_logfile1

After restarting mysql, the system will generate the ibdata file again according to the configuration

Failure 2: failure 2 encountered in the initial startup

Which: no socat in (/ usr/sbin:/sbin:/usr//bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin) WSREP_SST: [ERROR] socat not found in path: / usr/sbin:/sbin:/usr//bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin (20170323 1715 32 which 25.176)

The cause of the problem:

Wsrep_sst_auth= "sst:86rt6y1adf@abc" is configured in server.cnf

Need to use socat software package

Solution:

# yum install epel-release-y (epel source can provide socat package, other yum does not have socat package)

# yum install socat-y

Just start it again after installation

Failure 3: a large number of slow queries caused the cpu service to surge, resulting in server downtime

Cause of the problem: when a slow query is blocked, all subsequent requests will wait for the query to be completed before execution

Solution:

If there are only a few slow queries, you can directly use the kill slow query ID number to end the slow query; for example: mysql > kill 32232

If there are a large number of slow queries, you can only shut down the current database service.

Problems encountered when closing with / etc/init.d/mysql stop when there are a large number of slow queries:

1. The shutdown was very slow. After waiting for about 15 minutes, the shutdown failed, and the database could not log in.

two。 At this time, the kill-9 PID number is used to forcibly shut down the mysql process.

3. When / etc/init.d/mysql start is used at this time, the startup fails

4. Use / etc/init.d/mysql start to start again, and you can start successfully.

Temporary solution:

1. Find a database that can be used normally

two。 Remove databases that cannot be accessed normally in the front-end haproxy

3. Wait for the failed data to return to normal before adding this host from haproxy

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report