Errors with database

I have installed Virtualmin GPL into Debian and Ubuntu servers. Both times, i got this error when installing

“/tmp directory is mounted noexec. Installation cannot continue.”

/tmp partition has “noexec,nosuid,nodev” flags, so i temporally removed that noexec, and installer worked.

However, no i have issues with databases.
I keep getting thsese errors:

“Error: 126 - Incorrect key file for table ‘/tmp/#sql_851_0.MYI’; try to repair it”.

I have no idea what is creating that error. Does anyone know how to fix this?

I have Ubuntu Linux 12.04.1, with 8G ram, kernel Linux 3.2.0-34-generic on x86_64, host Leaseweb.

Google says it could be too large tmp file in mysql. I choosed “huge system” in virtualmin start wizard. Could this be related?

Howdy,

What is the output of the command “df -h”. That will include how much free space you have on your /tmp partition, would could be affecting that.

-Eric

root@host1:~# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 453G 4.3G 426G 1% / udev 3.9G 4.0K 3.9G 1% /dev tmpfs 1.6G 300K 1.6G 1% /run none 5.0M 0 5.0M 0% /run/lock none 3.9G 0 3.9G 0% /run/shm /dev/sda6 1.9G 35M 1.8G 2% /tmp /dev/sda2 90M 24M 61M 29% /boot

Howdy,

Well, that’s a fairly sizable /tmp dir… that should be plenty, unless you have some rather large databases you’re working with.

However, just to be sure, you could always edit your my.cnf file (usually in /etc/mysql/my.cnf), and set the “tmpdir” variable to point somewhere else, perhaps “/var/tmp”.

-Eric

I try that, thanks!

Okay, tell me if this is possible. I moved server again. And again database started doing huge querys.

Okay. i dumped database and reimported it again. Seems everything is fine after that. Could this be some version error and reimporting fixed it?

Well, that’s a fine question, I’m not entirely certain :slight_smile:

I read that the error you’re getting can occur when there’s some sort of table corruption, so another possibility is the re-importing it somehow resolved that corruption.

Or, if you’re now using a more recent MySQL version, that may, as you mentioned, have helped too.

-Eric

Yeah, old server was Debian lenny, this is latest Ubuntu.

I got that first error because /tmp folder got full when database was creating huge querys for some reason. CPU use was 15 or so., and server responded slowly. First i moved tmp it to /var/tmp, that fixed that first error, after i did that database reimport, it stopped creating those huge sql querys. Strange

ARGH, no, its back. Something creates HUGE querys and CPU is on the roof. How do i debug and fix this ? :frowning:

I found issue. Its one of my scripts. IP.Content.