๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ’ปTech/๐ŸฌMySQL

์„œ๋ฒ„ reboot ์ดํ›„ MariaDB ์‹คํ–‰ ์•ˆ๋˜๋Š” ๋ฌธ์ œ

by _viper_ 2021. 9. 3.
๋ฐ˜์‘ํ˜•

๐Ÿšซ ๋ฌธ์ œ ์›์ธ 

MariaDB ์„œ๋ฒ„๋ฅผ ์žฌ๊ธฐ๋™ํ•  ๊ฒฝ์šฐ pid ๋””๋ ‰ํ† ๋ฆฌ(/var/run/mariadb/)๋ฅผ ์ƒ์„ฑํ•˜์ง€ ๋ชปํ•ด ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒ

$ cat /etc/my.cnf.d/server.cnf
--------------------------------------
[server]
pid-file=/var/run/mariadb/mariadb.pid
--------------------------------------

 

๐Ÿ’ก ํ•ด๊ฒฐ ๋ฐฉ๋ฒ• (2๊ฐ€์ง€ ๋ฐฉ๋ฒ•)

1. pid-file ๊ฒฝ๋กœ๋ฅผ ๋ณ„๋„์˜ ๊ฒฝ๋กœ๋กœ (์‚ญ์ œ๋˜์ง€ ์•Š๋Š”) ์ง€์ •ํ•ด ์คŒ

$ vi /etc/my.cnf.d/server.cnf
----------------------------------
[server]
pid-file=/var/lib/mysql/mariadb.pid
----------------------------------

 

2. ๋ฆฌ๋ถ€ํŒ…ํ•  ๋•Œ pid-file ๊ฒฝ๋กœ๊ฐ€ ์ƒ์„ฑ๋˜๋„๋ก ํ•ด์ฃผ๋ฉด ๋จ

vi /usr/lib/tmpfiles.d/mariadb.conf
---------------------------------------
d /var/run/mariadb 0755 mysql mysql -
---------------------------------------