在 CentOS 7.7 上初始化 MariaDB 10.4.12
我在我的机器上配置了 3 个驱动器:1 个用于数据文件,1 个用于事务日志文件,1 个用于临时文件.
I configured 3 drives on my machine: 1 for data files, 1 for transaction logs files, and 1 for temporary files.
我想在安装完 yum 后立即初始化 MariaDB.这是我的步骤:
I would like to initialize MariaDB at its first run straight after yum installation. Here are my steps:
- 使用以下参数创建/etc/my.cnf
[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/
- 安装 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
我得到以下异常
无法启动服务器:在 unix 套接字上绑定:没有这样的文件或目录
谁能解释我做错了什么?这是实现我的目标的正确程序吗?
Can anyone shed some light on what I'm doing wrong? is this the right procedure to achieve my goal?
谢谢詹卢卡
推荐答案
需要设置socket参数
need to set the socket parameter
[client]
socket=/tmp/mysql.sock
...
[mysqld]
...
socket=/tmp/mysql.sock
...
相关文章