[英]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
解決了我的問題。 希望能幫助到你。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.