systemctl start mariadb 실행시 아래와 같은 오류 발생.
Failed to issue method call: No such file or directory.
아래와 같이 /usr/lib/systemd/system/mariadb.service의
소프트 링크가 /etc/systemd/system/multi-user.target.wants/mariadb.service 위치에
있어야 하나, 해당 파일이 없음.
-bash-4.2# systemctl status mariadb
mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled)
Active: inactive (dead)
확인 결과 mariadb 가 disable 되어 있음.
아래 명령 실행으로 생성.
-bash-4.2# systemctl enable mariadb
ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service'
enable 후 다시 확인.
-bash-4.2# systemctl status mariadb
mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
Active: inactive (dead)
위와 같이 나오는 데, 원인은 systemctl 으로 mariadb를 실행하지 않아서임.
/etc/init.d/mysqld start << 이 명령어로 실행 되고 있음.
/etc/init.d/mysqld stop 으로 mysql shutdown 후
systemctl start mariadb 실행. 에러 없이 실행됨.
확인.
-bash-4.2# systemctl status mariadb
mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
Active: active (running) since 목 2015-12-03 13:24:56 KST; 28s ago
Process: 35223 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
Process: 35194 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 35222 (mysqld_safe)
CGroup: /system.slice/mariadb.service
├─35222 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─35559 /usr/libexec/mysqld --basedir=/usr --datadir=/usr/local/mariadb/data --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/tmp/mysql.sock
12월 03 13:24:54 localhost.localdomain systemd[1]: Starting MariaDB database server...
12월 03 13:24:54 localhost.localdomain mysqld_safe[35222]: 151203 13:24:54 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
12월 03 13:24:54 localhost.localdomain mysqld_safe[35222]: 151203 13:24:54 mysqld_safe Starting mysqld daemon with databases from /usr/local/mariadb/data
12월 03 13:24:56 localhost.localdomain systemd[1]: Started MariaDB database server.
ps. 잘 되던게 갑자기 왜 이런지...