Mysql not starting
mysql stopped working over the weekend and I can't get it to restart on my vps
I'm getting this error. 141229 10:00:36 [Note] Plugin 'FEDERATED' is disabled. 141229 10:00:36 InnoDB: The InnoDB memory heap is disabled 141229 10:00:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins 141229 10:00:36 InnoDB: Compressed tables use zlib 1.2.3.4 ^G/usr/sbin/mysqld: Can't create/write to file '/tmp/ibHw49jH' (Errcode: 28) 141229 10:00:36 InnoDB: Error: unable to create temporary file; errno: 28 141229 10:00:36 [ERROR] Plugin 'InnoDB' init function returned error. 141229 10:00:36 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 141229 10:00:36 [ERROR] Unknown/unsupported storage engine: InnoDB 141229 10:00:36 [ERROR] Aborting I've been trying every post i can find but am not getting any further so any help would be amazing |
Code:
^G/usr/sbin/mysqld: Can't create/write to file '/tmp/ibHw49jH' (Errcode: 28) /tmp is full. Go figure. |
My understanding is limited and that's what I thought but when I run df -h
Filesystem Size Used Avail Use% Mounted on /dev/vda3 49G 19G 27G 42% / udev 490M 4.0K 490M 1% /dev tmpfs 200M 224K 199M 1% /run none 5.0M 0 5.0M 0% /run/lock none 498M 0 498M 0% /run/shm /dev/vda1 461M 37M 401M 9% /boot which seems to show lots of space |
tmpfs is not /tmp - That's a newbie banana skin, I'm afraid. Your check is interesting, though.
Code:
tmpfs 200M 224K 199M 1% /run free -ms 1 will print a free memory report every 1 second (ctrl_c to quit). So free -ms 1 && <command to start mysql> would tell you how the ram survives as mysql starts. I suspect you have not enough ram in your vm. |
free -ms 1 brings back
total used free shared buffers cached Mem: 995 650 345 0 163 97 -/+ buffers/cache: 388 606 Swap: 476 0 476 and after deleting some log files yesterday mysql seems to be running Code:
sudo netstat -tap | grep mysql SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_53c_0.MYI' (Errcode: 28) which again points to low disk space or inability to write to /tmp (by the way you have no idea how much I appreciate your help on this) |
why not have a look around in /tmp?
Code:
ls -a /tmp ..xfsm-ICE-<random_crap> session manager files Symlinks 5<random_crap> - pages printed via cups lilo<random_crap> lilo sessions I presume dhcp<random_crap> dhcp logons also .tmp and .part files in abundance. I have this in rc.local to keep the crap down Code:
rm -rf /tmp/{*.part,*.tmp,gpg*,5*} |
There doesn't seem to be very much there at all
Code:
ls -a /tmp |
ok, cd there as root. Check what the mysql user is and try
Code:
su <mysql_user> |
touch /tmp/somefile
touch: cannot touch `/tmp/somefile': No space left on device |
That looks to be your problem, which I told you about in post #2. You have the box. Go figure.
If you exit from mysql-user and use root, is there still no space? It could be write permissions (Unlikely) As a workaround, you may be able to set $TMPDIR to ~/ where they will have write permissions. Code:
export TMPDIR=~/ |
Nope same answer with root
This is where my I'm getting lost, The file system shows I have 27g available but there is no space in the /tmp directory, looking in the /tmp directory there doesn't seem to be many files there either. If I Move the temp directory would that solve the space problem or is that just if there were permission issues. Again thanks for your patients |
It could be a directory issue, or a filesystem problem. Mioving it sounds good
Code:
cd / |
moved the directory when I got to
Code:
install -dm 0777 tmp Quote:
Code:
sudo service mysql restart |
I've just noticed the the error message on the site has now changed to
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when i checked the sql erro file if found this Code:
141229 9:00:02 [Note] /usr/sbin/mysqld: Normal shutdown |
for information, post the output of
Code:
ls -a / |
All times are GMT -5. The time now is 06:33 PM. |