Centos7 机器重启后 Percona 5.7 不会自动启动

问题描述 投票:0回答:0

我正在运行 CentOS Linux 版本 7.9.2009(核心),我正在尝试使用 官方指南从 yum 存储库安装 Percona SQL server 5.7。

我使用了以下步骤:

$ sudo yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm
$ sudo percona-release setup ps57
$ yum install Percona-Server-server-57
$ sudo systemctl enable mysql # But in my case it was mysqld, not mysql

关于最后一行,如果我使用指南所说的内容,我会从操作系统中收到一条错误消息,说

too many levels of symlinks
。但是,如果我使用
mysqld
而不是
mysql
,则会创建 /etc/systemd/system 中的符号链接:

此时,再加上一些其他中间步骤,我已经启动并运行了服务器。我可以使用空的 root 密码登录 (

myql -u root -p
),我可以列出数据库。

这一切都很好,直到我重新启动服务器。由于某种原因,该服务不会自动启动,在执行

sudo service mysqld status
之后,我看到了这个输出:

这表明服务器配置有问题。但是,在执行

sudo service mysqld start
之后,服务就可以正常启动了。
mysql.log
文件显示如下内容:

2023-03-18T16:51:17.985324Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2023-03-18T16:51:17.985448Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-03-18T16:51:17.989952Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.41-44) starting as process 12993 ...
2023-03-18T16:51:17.999577Z 0 [Note] InnoDB: PUNCH HOLE support available
2023-03-18T16:51:17.999632Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-03-18T16:51:17.999636Z 0 [Note] InnoDB: Uses event mutexes
2023-03-18T16:51:17.999639Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2023-03-18T16:51:17.999642Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2023-03-18T16:51:17.999646Z 0 [Note] InnoDB: Using Linux native AIO
2023-03-18T16:51:18.002025Z 0 [Note] InnoDB: Number of pools: 1
2023-03-18T16:51:18.002187Z 0 [Note] InnoDB: Using CPU crc32 instructions
2023-03-18T16:51:18.004762Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2023-03-18T16:51:18.124386Z 0 [Note] InnoDB: Completed initialization of buffer pool
2023-03-18T16:51:18.142600Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2023-03-18T16:51:18.221724Z 0 [Note] InnoDB: Crash recovery did not find the parallel doublewrite buffer at /var/lib/mysql/xb_doublewrite
2023-03-18T16:51:18.224274Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2023-03-18T16:51:18.268156Z 0 [Note] InnoDB: Created parallel doublewrite buffer at /var/lib/mysql/xb_doublewrite, size 3932160 bytes
2023-03-18T16:51:18.382883Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-03-18T16:51:18.383006Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-03-18T16:51:18.595726Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2023-03-18T16:51:18.633395Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2023-03-18T16:51:18.633436Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2023-03-18T16:51:18.665733Z 0 [Note] InnoDB: Waiting for purge to start
2023-03-18T16:51:18.734039Z 0 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.7.41-44 started; log sequence number 2768817
2023-03-18T16:51:18.772089Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2023-03-18T16:51:18.772374Z 0 [Note] Plugin 'FEDERATED' is disabled.
2023-03-18T16:51:18.925210Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2023-03-18T16:51:18.925248Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2023-03-18T16:51:18.925253Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
2023-03-18T16:51:18.925255Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
2023-03-18T16:51:18.925708Z 0 [Note] InnoDB: Buffer pool(s) load completed at 230318 16:51:18
2023-03-18T16:51:18.926907Z 0 [Warning] CA certificate ca.pem is self signed.
2023-03-18T16:51:18.926992Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2023-03-18T16:51:18.927494Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2023-03-18T16:51:18.964455Z 0 [Note] IPv6 is not available.
2023-03-18T16:51:18.964503Z 0 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
2023-03-18T16:51:18.964531Z 0 [Note] Server socket created on IP: '0.0.0.0'.
2023-03-18T16:51:18.990121Z 0 [Note] Event Scheduler: Loaded 0 events
2023-03-18T16:51:19.027108Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.41-44'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Percona Server (GPL), Release 44, Revision 27f408641db

我看不到这些警告与服务无法自动启动之间的联系。关闭运行 Mysql 服务器的机器并再次重新启动它会再次出现问题,服务停止。

此外,我不知道服务日志所谈论的是哪个缺少依赖项。

mysql service centos percona
© www.soinside.com 2019 - 2024. All rights reserved.