无法正常启动 Mariadb?
Can't start Mariadb properly?
当我运行以下命令时:
mysqld --defaults-file=/srv/configs/mariadb/my.cnf
我得到如下:
150105 21:05:29 [ERROR] mysqld: Can't lock aria control file '/srv/dbs/mariadb/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds
150105 21:05:52 [Note] InnoDB: Using mutexes to ref count buffer pool pages
150105 21:05:52 [Note] InnoDB: The InnoDB memory heap is disabled
150105 21:05:52 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
150105 21:05:52 [Note] InnoDB: Memory barrier is not used
150105 21:05:52 [Note] InnoDB: Compressed tables use zlib 1.2.8
150105 21:05:52 [Note] InnoDB: Using Linux native AIO
150105 21:05:52 [Note] InnoDB: Using CPU crc32 instructions
150105 21:05:52 [Note] InnoDB: Initializing buffer pool, size = 128.0M
150105 21:05:52 [Note] InnoDB: Completed initialization of buffer pool
150105 21:05:52 [Note] InnoDB: Highest supported file format is Barracuda.
150105 21:05:52 [Note] InnoDB: 128 rollback segment(s) are active.
150105 21:05:52 [Note] InnoDB: Waiting for purge to start
150105 21:05:52 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.21-70.0 started; log sequence number 1616961
150105 21:05:52 [Note] Plugin 'FEEDBACK' is disabled.
150105 21:05:52 [Note] Server socket created on IP: '0.0.0.0'.
150105 21:05:52 [Note] Event Scheduler: Loaded 0 events
150105 21:05:52 [Note] WSREP: Read nil XID from storage engines, skipping position init
150105 21:05:52 [Note] WSREP: wsrep_load(): loading provider library 'none'
150105 21:05:52 [Note] mysqld: ready for connections.
Version: '10.1.2-MariaDB-1~trusty-wsrep' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution, wsrep_25.10.r4123
此时终端挂起,唯一的 Ctrl+Z 通过将此进程发送到后台来工作。
一些有用的信息我的自定义数据库存储目录的外观。看起来应该有一些属于 mysql:mysql:
的文件
-rw-rw---- 1 dnsmasq systemd-journal 16384 янв. 6 00:05 aria_log.00000001
-rw-rw---- 1 dnsmasq systemd-journal 52 янв. 6 00:05 aria_log_control
drwx------ 2 dnsmasq systemd-journal 4096 янв. 5 23:17 bla
-rw-r--r-- 1 root root 0 янв. 4 21:51 debian-10.1.flag
-rw-rw---- 1 dnsmasq systemd-journal 12582912 янв. 6 00:10 ibdata1
-rw-rw---- 1 dnsmasq systemd-journal 50331648 янв. 6 00:10 ib_logfile0
-rw-rw---- 1 dnsmasq systemd-journal 50331648 янв. 4 21:51 ib_logfile1
-rw-rw---- 1 dnsmasq systemd-journal 0 янв. 5 19:05 multi-master.info
drwxr-xr-x 2 dnsmasq root 4096 янв. 5 19:05 mysql
-rw------- 1 root root 14 янв. 5 19:05 mysql_upgrade_info
drwx------ 2 dnsmasq systemd-journal 4096 янв. 5 19:05 performance_schema
-rw-rw---- 1 dnsmasq systemd-journal 24576 янв. 6 00:10 tc.log
drwx------ 2 dnsmasq systemd-journal 4096 янв. 5 19:27 testo
我哪里错了?
几天来我一直在为类似的问题而苦苦挣扎。我的问题已通过将内存从 512MB 增加到至少 1GB 解决(尽管您的问题似乎与内存无关)。
我建议检查 SELinux 是否启用 。在新的 CentOS 7 服务器 上,默认情况下是为我准备的。
设置
SELINUX=disabled
在此文件中
cat /etc/selinux/config
解决了我的问题。希望对你有帮助。
当我运行以下命令时:
mysqld --defaults-file=/srv/configs/mariadb/my.cnf
我得到如下:
150105 21:05:29 [ERROR] mysqld: Can't lock aria control file '/srv/dbs/mariadb/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds
150105 21:05:52 [Note] InnoDB: Using mutexes to ref count buffer pool pages
150105 21:05:52 [Note] InnoDB: The InnoDB memory heap is disabled
150105 21:05:52 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
150105 21:05:52 [Note] InnoDB: Memory barrier is not used
150105 21:05:52 [Note] InnoDB: Compressed tables use zlib 1.2.8
150105 21:05:52 [Note] InnoDB: Using Linux native AIO
150105 21:05:52 [Note] InnoDB: Using CPU crc32 instructions
150105 21:05:52 [Note] InnoDB: Initializing buffer pool, size = 128.0M
150105 21:05:52 [Note] InnoDB: Completed initialization of buffer pool
150105 21:05:52 [Note] InnoDB: Highest supported file format is Barracuda.
150105 21:05:52 [Note] InnoDB: 128 rollback segment(s) are active.
150105 21:05:52 [Note] InnoDB: Waiting for purge to start
150105 21:05:52 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.21-70.0 started; log sequence number 1616961
150105 21:05:52 [Note] Plugin 'FEEDBACK' is disabled.
150105 21:05:52 [Note] Server socket created on IP: '0.0.0.0'.
150105 21:05:52 [Note] Event Scheduler: Loaded 0 events
150105 21:05:52 [Note] WSREP: Read nil XID from storage engines, skipping position init
150105 21:05:52 [Note] WSREP: wsrep_load(): loading provider library 'none'
150105 21:05:52 [Note] mysqld: ready for connections.
Version: '10.1.2-MariaDB-1~trusty-wsrep' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution, wsrep_25.10.r4123
此时终端挂起,唯一的 Ctrl+Z 通过将此进程发送到后台来工作。
一些有用的信息我的自定义数据库存储目录的外观。看起来应该有一些属于 mysql:mysql:
的文件-rw-rw---- 1 dnsmasq systemd-journal 16384 янв. 6 00:05 aria_log.00000001
-rw-rw---- 1 dnsmasq systemd-journal 52 янв. 6 00:05 aria_log_control
drwx------ 2 dnsmasq systemd-journal 4096 янв. 5 23:17 bla
-rw-r--r-- 1 root root 0 янв. 4 21:51 debian-10.1.flag
-rw-rw---- 1 dnsmasq systemd-journal 12582912 янв. 6 00:10 ibdata1
-rw-rw---- 1 dnsmasq systemd-journal 50331648 янв. 6 00:10 ib_logfile0
-rw-rw---- 1 dnsmasq systemd-journal 50331648 янв. 4 21:51 ib_logfile1
-rw-rw---- 1 dnsmasq systemd-journal 0 янв. 5 19:05 multi-master.info
drwxr-xr-x 2 dnsmasq root 4096 янв. 5 19:05 mysql
-rw------- 1 root root 14 янв. 5 19:05 mysql_upgrade_info
drwx------ 2 dnsmasq systemd-journal 4096 янв. 5 19:05 performance_schema
-rw-rw---- 1 dnsmasq systemd-journal 24576 янв. 6 00:10 tc.log
drwx------ 2 dnsmasq systemd-journal 4096 янв. 5 19:27 testo
我哪里错了?
几天来我一直在为类似的问题而苦苦挣扎。我的问题已通过将内存从 512MB 增加到至少 1GB 解决(尽管您的问题似乎与内存无关)。 我建议检查 SELinux 是否启用 。在新的 CentOS 7 服务器 上,默认情况下是为我准备的。
设置
SELINUX=disabled
在此文件中
cat /etc/selinux/config
解决了我的问题。希望对你有帮助。