Gianluca
Gianluca

Reputation: 31

Initialize MariaDB 10.4.12 on CentOS 7.7

I configured 3 drives on my machine: 1 for data files, 1 for transaction logs files, and 1 for temporary files.

I would like to initialize MariaDB at its first run straight after yum installation. Here are my steps:

  1. created /etc/my.cnf with the following parameters
[mysqld]
aria-log-dir-path=/tempdb/mysql/
datadir=/data/mysql/
tmpdir=/tempdb/mysql/
innodb_data_home_dir=/data/mysql/
innodb_log_group_home_dir=/tlogs/mysql/
innodb_undo_directory=/tlogs/mysql/
aria-log-dir-path=/tempdb/mysql/
  1. install MariaDB
sudo yum -y update

sudo tee /etc/yum.repos.d/MariaDB.repo<<EOF 
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF

sudo yum makecache fast

sudo yum -y install MariaDB-server MariaDB-client

sudo systemctl start mariadb

I get the following exception

Can't start server : Bind on unix socket: No such file or directory

Can anyone shed some light on what I'm doing wrong? is this the right procedure to achieve my goal?

Thx Gianluca

Upvotes: 0

Views: 609

Answers (1)

Gianluca
Gianluca

Reputation: 31

need to set the socket parameter

[client]
socket=/tmp/mysql.sock
...
[mysqld]
...
socket=/tmp/mysql.sock
...

Upvotes: 1

Related Questions