日志如下
221109 10:24:10 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb pid ended
221109 10:24:11 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
221109 10:24:11 [Note] /usr/libexec/mysqld (mysqld 5 5 68-MariaDB) starting as process 7158
221109 10:24:11 InnoDB: The InnoDB memory heap is disabled
221109 10:24:11 InnoDB: Mutexes and rw_locks use GCC atomic builtins
221109 10:24:11 InnoDB: Compressed tables use zlib 1 2 7
221109 10:24:11 InnoDB: Using Linux native AIO
221109 10:24:11 InnoDB: Initializing buffer pool, size = 128 0M
221109 10:24:11 InnoDB: Completed initialization of buffer pool
221109 10:24:11 InnoDB: highest supported file format is Barracuda
221109 10:24:11 InnoDB: Waiting for the background threads to start
221109 10:24:12 Percona XtraDB (http://www percona com) 5 5 61-MariaDB-38 13 started; log sequence number 1597945
221109 10:24:12 [Note] Plugin 'FEEDBACK' is disabled
221109 10:24:12 [Note] Server socket created on IP: '0 0 0 0'
221109 10:24:12 [Note] Event Scheduler: Loaded 0 events
221109 10:24:12 [Note] /usr/libexec/mysqld: ready for connections
Version: '5 5 68-MariaDB' socket: '/var/lib/mysql/mysql sock' port: 3306 MariaDB Server
221109 10:32:30 [Note] /usr/libexec/mysqld: Normal shutdown
221109 10:32:30 [Note] Event Scheduler: Purging the queue 0 events
221109 10:32:30 InnoDB: Starting shutdown
221109 10:32:31 InnoDB: Shutdown completed; log sequence number 1597945
221109 10:32:31 [Note] /usr/libexec/mysqld: Shutdown complete
221109 10:32:31 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb pid ended
221109 10:32:32 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
221109 10:32:32 [Note] /usr/libexec/mysqld (mysqld 5 5 68-MariaDB) starting as process 16729
221109 10:32:32 InnoDB: The InnoDB memory heap is disabled
221109 10:32:32 InnoDB: Mutexes and rw_locks use GCC atomic builtins
221109 10:32:32 InnoDB: Compressed tables use zlib 1 2 7
221109 10:32:32 InnoDB: Using Linux native AIO
221109 10:32:32 InnoDB: Initializing buffer pool, size = 128 0M
221109 10:32:32 InnoDB: Completed initialization of buffer pool
221109 10:32:32 InnoDB: Operating system error number 13 in a file operation
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory
InnoDB: File name /ibdata1
InnoDB: File operation call: 'open'
InnoDB: Cannot continue operation
221109 10:32:32 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb pid ended
221109 10:35:24 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
221109 10:35:24 [Note] /usr/libexec/mysqld (mysqld 5 5 68-MariaDB) starting as process 2633
221109 10:35:24 InnoDB: The InnoDB memory heap is disabled
221109 10:35:24 InnoDB: Mutexes and rw_locks use GCC atomic builtins
221109 10:35:24 InnoDB: Compressed tables use zlib 1 2 7
221109 10:35:24 InnoDB: Using Linux native AIO
221109 10:35:25 InnoDB: Initializing buffer pool, size = 128 0M
221109 10:35:25 InnoDB: Completed initialization of buffer pool
221109 10:35:25 InnoDB: Operating system error number 13 in a file operation
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory
InnoDB: File name /ibdata1
InnoDB: File operation call: 'open'
InnoDB: Cannot continue operation
221109 10:35:25 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb pid ended
httpd启动失败是文件权限的问题,好像一个日志文件打不开。mariadb没有相关日志,无法判断。不过大胆推测和httpd的原因差不多,是你把整个目录的权限搞乱了。
这个解决方法比较简单,应该都是yum安装的,先卸载了在安装一次即可。相关命令如下:
yum remove mariadb-server httpd #卸载命令 。
yum install mariadb-server httpd -y #两个服务重新安装命令,mariadb安装完毕后需要重新初始化,httpd基本开箱即用。
我按照这个教程操作的,但是到启用服务的时候就报错了