• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved MariaDB mysqldump error

Simon Z

New Pleskian
Hello,

i have the following problem in the Plesk Onyx Backup Manager and console:

mysqldump: unknown variable 'tmpdir=/var/tmp'


System:
CentOS 7x
MariaDB 10.1

my.cnf:

[mysqld]
bind-address = 127.0.0.1
skip_name_resolve
tmpdir=/var/tmp
log-error=/var/log/mariadb/mariadb.log
local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd

#optimize

query_cache_type = 1
query_cache_limit = 256K
query_cache_min_res_unit = 2k
query_cache_size = 80M
tmp_table_size= 64M
max_heap_table_size= 64M
innodb_buffer_pool_size=327M
slow-query-log = 1
slow-query-log-file = /var/lib/mysql/mysql-slow.log
long_query_time = 1
thread_cache_size=4

innodb-defragment=1

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid


tmpdir=/var/tmp

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

[mysqldump]
tmpdir=/var/tmp


Thanks!
 
Last edited:
Normally MySQL uses the temporary directory defined in the environment variable TMPDIR. If that variable is not set, it uses the system default temporary directory for temporary files. There is no need to enter a definition in the my.cnf file and I am not aware that it is even possible to set it in that file. I suggest to remove both tmpdir-lines from your my.cnf file, then restart MySQL service (or mariadb service, whichever you are using).

If you need a different MySQL temporary storage location, please refer to https://dev.mysql.com/doc/refman/5.7/en/temporary-files.html for a detailed explanation on how to set that. Use "# printenv" to list all environment variables or "# export TMPDIR=yourtempdir" to set it.
 
Back
Top