Question
How do you move the mysql tmpdir out of /tmp and into /home?
Answer
- Log in to the server via SSH as 'root'
Create the file
/etc/systemd/system/mariadb.service.d/override.confwith your preferred text editor, with the following contents:CONFIG_TEXT: [Service]
ProtectHome=falseRun the following command:
# systemctl daemon-reload
Restart the service:
# /scripts/restartsrv_mysql
Create the
/homemysql tmpdir:# mkdir -v /home/mysqltmp; chown -v mysql:mysql /home/mysqltmp
Put the following in
/etc/my.cnfunder the [mysqld] section:CONFIG_TEXT: tmpdir=/home/mysqltmp
Restart MariaDB:
# /scripts/restartsrv_mysql
Create the
/homemysql tmpdir:# mkdir -v /home/mysqltmp; chown -v mysql:mysql /home/mysqltmp
Put the following in
/etc/my.cnfunder the [mysqld] section:CONFIG_TEXT: tmpdir=/home/mysqltmp
Restart MySQL:
# /scripts/restartsrv_mysql
You can verify that the mysql tmpdir was changed by running the following command:
# mysqladmin variables|grep tmpdir
Comments
0 comments
Article is closed for comments.