I get ErrorCode: 2 which I assume is ENOENT (No such file or directory). Here are the full details (from my stackoverflow post, which was closed by the powers-that-be as being of limited interest. Maybe if I mentioned that the app was to help programmers write in-place-list-reversal functions. But I gather I'm at the right place now). Here are the details...
This happened after I restarted my Linode VPS (which it turns out I didn't need to, but it uncovered this bug).
$ ps auxww | grep mysql
mysql 19755 0.0 4.2 309904 21396 ? Sl Mar16 20:50 /usr/libexec/mysqld
--basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --log-
error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql
/mysql.sock
This looks correct. mysql* are in /usr/bin, and the datadir is correct.
When I start the mysql client with the credentials in database.yml it works as expected. But when I run rails console, at startup I get the error
data_loader.rb failed: Can't create/write to file '/tmp/#sql_4d2b_0.MYI' (Errcode: 2)
It's not a disk-space problem
$ ls -ld /tmp
drwxrwxrwt 11 root root 4096 Apr 1 17:36 /tmp
$ df /tmp
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 20386924 5496712 14061840 29% /
Here's /etc/my.cnf:
[mysqld]
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under different user or group,
# customize your systemd unit file for mysqld according to the
# instructions in http://fedoraproject.org/wiki/Systemd
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
And all that /etc/rc.d/init.d/mysqld does is run service mysqld start and .... stop (yes, this is on Fedora Core).
This is with Rails 3.0.8 on Ruby 1.9.2p320
Anything else? Nothing in /var/log/mysqld.log
df -i
?