sorry guys for late reply. here are service files under /usr/lib/systemd/system and logfiles.
apache
========================================================================================
[Unit]
Description=The Apache HTTP Server
After=network.service mariadb.service remote-fs.target nss-lookup.target
Documentation=man:httpd(8)
Documentation=man:apachectl(8)
[Service]
Type=notify
EnvironmentFile=/etc/sysconfig/httpd
ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND
ExecReload=/usr/sbin/httpd $OPTIONS -k graceful
ExecStop=/bin/kill -WINCH ${MAINPID}
KillSignal=SIGCONT
PrivateTmp=true
[Install]
WantedBy=multi-user.target
========================================================================================
mariadb
========================================================================================
[Unit]
Description=MariaDB database server
After=syslog.target
After=network.service
[Service]
Type=simple
User=mysql
Group=mysql
ExecStartPre=/usr/libexec/mariadb-prepare-db-dir n
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
# per bug #547485
ExecStart=/usr/bin/mysqld_safe --basedir=/usr
ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID
# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=300
# Place temp files in a secure directory, not /tmp
PrivateTmp=true
# I have added
LimitNOFILE=infinity
LimitMEMLOCK=infinity
[Install]
WantedBy=multi-user.target
========================================================================================
my.cnf
========================================================================================
bind-address = localhost
ft_min_word_len = 3
user = mysql
port = 3306
default_storage_engine = InnoDB
socket = /var/lib/mysql/mysql.sock
pid_file = /var/lib/mysql/mysql.pid
datadir = /var/lib/mysql
innodb_buffer_pool_size = 1024M
innodb_file_per_table=1
innodb_flush_method = O_DIRECT
key_buffer_size = 64M
log_error = /var/lib/mysql/mysql-error.log
slow_query_log = 1
slow_query_log_file = /var/lib/mysql/mysql-slow.log
tmp_table_size = 32M
max_heap_table_size = 32M
query_cache_type = 0
query_cache_size = 00
max_connections = 300
thread_cache_size = 50
table_open_cache = 800
open_files_limit = 65535
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
!includedir /etc/my.cnf.d
========================================================================================
mysql-slow.log
========================================================================================
/usr/libexec/mysqld, Version: 5.5.44-MariaDB-log (MariaDB Server). started with:
Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock
and again that error:
========================================================================================
no errors in mysql-error.log
========================================================================================
mariadb.log
========================================================================================
[Note] /usr/libexec/mysqld: Normal shutdown
[Note] Event Scheduler: Purging the queue. 0 events
InnoDB: Starting shutdown...
InnoDB: Shutdown completed; log sequence number 6468534974
[Note] /usr/libexec/mysqld: Shutdown complete
mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
[Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB-log) starting as process 3061 ...
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.7
InnoDB: Using Linux native AIO
InnoDB: Initializing buffer pool, size = 1.0G
InnoDB: Completed initialization of buffer pool
InnoDB: highest supported file format is Barracuda.
InnoDB: Waiting for the background threads to start
Percona XtraDB (
http://www.percona.com) 5.5.43-MariaDB-37.2 started; log sequence number 6468534974
[Note] Plugin 'FEEDBACK' is disabled.
[Note] Server socket created on IP: '127.0.0.1'.
[Note] Event Scheduler: Loaded 0 events
[Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.44-MariaDB-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
========================================================================================
Owncloud.log
{"reqId":"dswK\/N49mSbawKvu\/UQV","remoteAddr":"","app":"cron","message":"Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '\/var\/lib\/mysql\/mysql.sock' (2)","level":4,"time":"2016-02-02_00:45:03"}