You are not logged in.

#1 2015-08-06 19:07:07

teetee1
Member
Registered: 2013-08-24
Posts: 13

mysql dump file cannot be written into the default tmp (/tmp)

arch linux
Linux node00 3.16.4-1-ARCH #1 SMP PREEMPT Mon Oct 6 08:22:27 CEST 2014 x86_64 GNU/Linux

I have masked the tmpfs so that I don't have the size limitation for /tmp, according to
https://wiki.archlinux.org/index.php/Tmpfs

# systemctl mask tmp.mount

Here is the output:
test command output

If I use a different place (e.g. /tmp1) that is not /tmp, everything runs fine.

The mysql daemon is run by mysql account, the mysql account has no trouble creating or touching anything in /tmp.

I am just curious what is so special about this /tmp. The 't' bit should not matter right? It only matters when the account that tries to delete the file in /tmp is not the same as the one who created it.

The command that was used in the script above is equivalent to
mysql -u <username> -p <database name> -e "SELECT * INTO OUTFILE '/tmp/tmpfile' FROM = containers WHERE id LIKE '.recycle%'
// dump everything from a table called containers and id contains .recycle% into /tmp/tmpfile

Last edited by teetee1 (2015-08-06 19:10:13)

Offline

Board footer

Powered by FluxBB