F
F
feniksdv2020-11-18 11:22:28
linux
feniksdv, 2020-11-18 11:22:28

Why does the MYSQL database break and how to solve the problem?

I have a project in laravel. Every day the base breaks down, disappears. This is what phpmyadmin shows.
5fb4d7cdb3205579604293.png
Tried to restore like this:

mysqlcheck -u root -p --auto-repair --check --all-databases

I get this:
keycheck_ru_db.WARNING OK WPS

server 1gb, 1 ram. mysql -8v muscle
settings.

[mysqld]
innodb-buffer-pool-size=32M
innodb-flush-log-at-trx-commit=2
innodb-flush-method=O_DIRECT
max-heap-table-size=16M
sql-mode=
tmp-table-size=16M
transaction-isolation=READ-COMMITTED
default-authentication-plugin=mysql_native_password
###############
#skip-networking
skip-name-resolve=1
skip-federated
innodb_log_file_size=6M
join_buffer_size=256K
innodb_buffer_pool_instances=1
#skip-grant-tables


The logs only show the following errors:

2020-11-17T07:00:28.555129Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.22).
2020-11-17T07:00:30.662765Z 0 [Warning] [MY-010909] [Server] /usr/sbin/mysqld: Forcing close of thread 1924  user: 'keycheck_ru_usr'.
2020-11-17T07:00:30.688365Z 0 [Warning] [MY-010909] [Server] /usr/sbin/mysqld: Forcing close of thread 1878  user: 'keycheck_ru_usr'.
2020-11-17T07:00:32.142960Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22)  MySQL Community Server - GPL.
2020-11-17T07:00:33.650327Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.22) starting as process 6904
2020-11-17T07:00:33.684192Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2020-11-17T07:00:34.482626Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2020-11-17T07:00:34.697530Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2020-11-17T07:00:34.943359Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-11-17T07:00:34.943709Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2020-11-17T07:00:34.984462Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.22'  socket: '/var/lib/mysql/mysql.sock'  port: 3306


I restore from the dump, it works fine for a day, then something happens and in the morning I see the picture as in the picture above.

What to do?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
neol, 2020-11-18
@feniksdv

They wrote to you in English that the site / database was broken, data was leaked and they want money.
Look for a hole and close it. For starters, it’s worth stopping shining the bare loin of mysql into the entire network.

R
Roman Mirilaczvili, 2020-11-18
@2ord

[Server] Received SHUTDOWN from user
If this happens every day, then this may be the reason.
Check user access rights to the DBMS.
If there is server monitoring, then check the load on the server. If not, then add monitoring.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question