无法正确启动Mariadb?

时间:2015-01-05 21:37:23

标签: mysql database ubuntu permissions mariadb

当我运行以下命令时:

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

我错了什么?

1 个答案:

答案 0 :(得分:0)

我在类似的问题上奋斗了几天。我的问题通过将内存从 512MB 增加到至少 1GB 来解决(尽管您的问题似乎与内存无关)。 我建议检查 SELinux是否已启用。默认情况下,它适用于新的 CentOS 7服务器

设置

SELINUX=disabled

在此文件中

cat /etc/selinux/config

解决了我的问题。希望它有所帮助。