I
I
Igor2019-01-10 17:33:33
MySQL
Igor, 2019-01-10 17:33:33

Why doesn't MySql in bitrix use tmpdir to store temporary files?

Mounted tmpfs in /var/lib/mysql/tmp,
registered the path tmpdir=/var/lib/mysql/tmp
in /etc/my.cnf
and /etc/mysql/conf.d/z_bx_custom.cnf
issued 777 rights to the folder from as root,
restarted mysqld
also restarted the server
via ftp - there are no files in the folder..
df -h:
Filesystem Size Used Avail Use% Mounted on
tmpfs 4.0G 0 4.0G 0% /var/lib/mysql/
tmp in that memcached works?
BVM 7.3.0
CentOS 7.5
MySQL 5.7.21-21

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Syomov, 2019-01-10
@aif88

issued 777 rights to the folder from under root,

Mysql is not running as root. And 777 is bad. =) It is necessary to make the owner of the user under which mysql is launched (most often it is, oddly enough, mysql), and give him write permissions.
Also, it's best not to create extra folders in /var/lib/mysql. What if someone creates a tmp database?
Temporary files are a rather short-lived thing, in the case of mysql. They are created during requests, and even then not all, and are deleted immediately after. Those. most of the time it will be empty.
It has nothing to do with mysql as such, and does not interact with it in any way.
But if application data is cached with it, and there are simply no queries to the database, then yes. =)

F
Fixid, 2019-01-10
@Fixid

So it cleans up after itself immediately after use
And look at created_tmp_disk_tables , maybe nothing is created there.
Bonus InnoDB seems to create tmp next to the base files, ignoring tmpdir

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question