I am trying to run a mariadb server on a docker image(CentOS Linux release 7.3.1611 (Core)).
I install mariadb with command yum install mysql. after installing complete, i try to execute command mysql but i got this error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
the directory in /var/lib/mysql is empty
the my.conf file in /etc contains:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
with running command systemctl start mariadb
I got this error:
Failed to get D-Bus connection: Operation not permitted
Did I make any mistake?