I looked through the mailing list archive for an answer to this, but I can't
find a way around this problem.

I have a table with about 225,000 records.  I kept getting an out of disk
space error when running this query:

mysql> select count(*),state from import_talents group by state;
ERROR 3: Error writing file '/tmp/MYRuTInF' (Errcode: 28)

Other people with this problem have been told to redirect their TMPDIR to
another location.  The /tmp is mounted on /:

[root@www /]# df -a
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda1               743466    526930    216536  71% /
none                         0         0         0   -  /proc
/dev/hda3               198601     43943    154658  22% /var
/dev/hda4              6901425    849752   6051673  12% /home
none                         0         0         0   -  /dev/pts

 My /home directory has about 6G, so I created a directory under there
called /home/tempspace and chmod that directory 777.

I changed /etc/rc.d/init.d/mysql to point the TMPDIR to this directory.
Stop and Start mysql:

mysql> show variables;
+----------------------------+---------------------------+
| Variable_name              | Value                     |
+----------------------------+---------------------------+
| back_log                   | 5                         |
| connect_timeout            | 5                         |
| basedir                    | /                         |
| datadir                    | /var/lib/mysql/           |
| delayed_insert_limit       | 100                       |
| delayed_insert_timeout     | 300                       |
| delayed_queue_size         | 1000                      |
| join_buffer                | 131072                    |
| flush_time                 | 0                         |
| key_buffer                 | 8388600                   |
| language                   | /usr/share/mysql/english/ |
| log                        | OFF                       |
| log_update                 | OFF                       |
| long_query_time            | 10                        |
| low_priority_updates       | OFF                       |
| max_allowed_packet         | 1048576                   |
| max_connections            | 100                       |
| max_connect_errors         | 10                        |
| max_delayed_insert_threads | 20                        |
| max_join_size              | 4294967295                |
| max_sort_length            | 1024                      |
| max_write_lock_count       | 4294967295                |
| net_buffer_length          | 16384                     |
| pid_file                   | /var/lib/mysql/mysqld.pid |
| port                       | 3306                      |
| protocol_version           | 10                        |
| record_buffer              | 131072                    |
| skip_locking               | ON                        |
| skip_networking            | OFF                       |
| socket                     | /var/lib/mysql/mysql.sock |
| sort_buffer                | 2097144                   |
| table_cache                | 64                        |
| thread_stack               | 65536                     |
| tmp_table_size             | 1048576                   |
| tmpdir                     | /home/tempspace/          |
| version                    | 3.22.32                   |
| wait_timeout               | 28800                     |
+----------------------------+---------------------------+
37 rows in set (0.00 sec)

Run the query again:

mysql> select count(*),state from import_talents group by state;
ERROR 3: Error writing file '/home/tempspace/MYfZExbS' (Errcode: 122)

Error 122 tells me that the USER LIMIT has been reached.  (I'm on a Redhat
Linux system).
Well, let's check what the limit is:

[root@www]$ ulimit
unlimited

Maybe the mysql has a limit?

[root@www /]# su mysql
[mysql@www /]$ ulimit
unlimited

Does anyone have a suggestion about what I'm doing wrong?  This is a
two-pronged "I'm a Linux Newbie"/"Please rescue me from my ignorance" type
of question.

Thank you,
Richard
[EMAIL PROTECTED]


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to