Linux Mint launches slow mysql query at system startup

My debian byte loads so slowly after I installed MySQL and imported several databases on it. If you are looking for some kind of operator, I found it at boot time:

mysql> show full processlist; +----+------------------+-----------+------+---------+------+----------------+----------------------------------------------------------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+------------------+-----------+------+---------+------+----------------+----------------------------------------------------------------------+ | 9 | debian-sys-maint | localhost | NULL | Query | 12 | Opening tables | select count(*) into @discard from `information_schema`.`PARTITIONS` | | 10 | root | localhost | NULL | Query | 0 | NULL | show full processlist | +----+------------------+-----------+------+---------+------+----------------+----------------------------------------------------------------------+ 2 rows in set (0.00 sec) 

Here is the statement causing the problem:

 select count(*) into @discard from `information_schema`.`PARTITIONS` 

I have + -10 databases worth more than 8 GB.

Is there any configuration to disable this request at system boot? If so, why run it at boot time?

Information

I have a standard MySQL installation without user configurations.

Sincerely.

+4
source share
1 answer

It seems that Debian on which the Linux Mint is installed has scripts that run when the mysql server starts or restarts, to check for damaged tables and warnings for that.

On my Debian server, the culprit looks like /etc/mysql/debian-start bash script, which in turn calls /usr/share/mysql/debian-start.inc.sh , so check both scripts and comment out the function that iterates all your tables, look, it seems, the following:

 check_for_crashed_tables; 

which is called from the debian-start script mentioned above.

+7
source

Source: https://habr.com/ru/post/1435947/


All Articles