Bug #14239 | mysql forgets where its databases are stored | ||
---|---|---|---|
Submitted: | 23 Oct 2005 14:11 | Modified: | 3 Nov 2005 7:27 |
Reporter: | Hanno Wagner | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1.14 | OS: | NetBSD-2.0G |
Assigned to: | CPU Architecture: | Any |
[23 Oct 2005 14:11]
Hanno Wagner
[23 Oct 2005 14:44]
Valeriy Kravchuk
Thank you for a problem report. Never seen such a situation personally... Please, send the complete results of the following commands: ls -l /var/mysql (there should be a mysql subdirectory) ls -l /var/mysql/mysql df -k (not sure that it is a right command for NetBSD... I need to know, is there any space left in the /var filesystem) The content of your error log would be useful too.
[23 Oct 2005 15:18]
Hanno Wagner
okay. I'll do it as user mysql, since under that user runs the server: angua:~> su - Password: Terminal type is screen. angua# su - mysql $ (will be in files)
[23 Oct 2005 15:18]
Hanno Wagner
ls -l /var/mysql
Attachment: ls-l.txt (text/plain), 4.79 KiB.
[23 Oct 2005 15:19]
Hanno Wagner
ls -l /var/mysql/mysql
Attachment: ls-l-mysql.txt (text/plain), 3.01 KiB.
[23 Oct 2005 15:19]
Hanno Wagner
df -k
Attachment: df-k.txt (text/plain), 885 bytes.
[23 Oct 2005 15:19]
Hanno Wagner
tail -f /var/mysql/angua.err
Attachment: error.log (text/x-log), 4.80 KiB.
[24 Oct 2005 13:18]
Valeriy Kravchuk
Thank you for the additional information. The only visible problem for me is the following: /dev/sd0f 843726 772530 29010 96% /var You have almost no free space in /var filesystem (and in /, where /tmp is located, I suppose, too). So, this may lead to problems with indexes and those *sql* files you got everywhere. Is it possible for you to free some space in /var? There are other ideas about possible reasons for this bug among developers, but I am not ready to give them to you right now. Can you try to compile and use 4.1.15, by the way? What threads library do you use? What configure options?
[24 Oct 2005 15:57]
Hanno Wagner
I moved my mySQL-Tables on another filesystem with a lot of space (/ and /tmp have enough space, I guess 75MB should be enough). I'll monitor wether the problem happens again. But none of the problems yet happened while there was a full filesystem...
[24 Oct 2005 16:28]
Valeriy Kravchuk
Another advice I can give you, if you ever try to build MySQL (4.1.15 or whatever) from sources next time on NetBSD, please, add -DHAVE_BROKEN_REALPATH option to configure. See, for example, http://jeremy.zawodny.com/blog/archives/000697.html for details. Even if it is already fixed for FreeBSD, you may suffer from the similar problem. Please, inform about the results.
[24 Oct 2005 22:19]
Hanno Wagner
I have the same error as before. /dev/sd0a 204M 97M 96M 50% / /dev/sd0h 3.4G 620M 2.6G 18% /var/space means: there is enough space for all files. The last entries in the error-log are: 055324 17:53:41 Starting mysqld daemon with databases from /var/space/mysql 055324 17:53:41 mysqld started 051024 17:53:41 InnoDB: Started; log sequence number 0 43942 /usr/pkg/libexec/mysqld: ready for connections. Version: '4.1.14-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution 051025 0:09:45 [ERROR] /usr/pkg/libexec/mysqld: Can't find file: 'evo_posts.MYI' (errno: 2) The last entry in angua.000003 is: # Time: 051025 0:09:47 # User@Host: blognidhoegg[blognidhoegg] @ localhost [] SET insert_id=42176; INSERT INTO evo_hitlog( visitTime, visitURL, hit_ignore, referingURL, baseDomain, ^M hit_blog_ID, hit_remote_addr, hit_user_agent ) ^M VALUES( FROM_UNIXTIME(1130191784), '/index.php?m=199201', 'no', ^M 'http://cheap-viagra-online.pe.nu/', 'cheap-viagra-online.pe.nu', 1, ^M '219.93.174.106', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)'); (means: backtrack-Spam in a log)
[25 Oct 2005 11:39]
Valeriy Kravchuk
OK. The problem was not really related to a free space. Have you tried to reconfigure and recompile 4.1.14 or 4.1.15 with -DHAVE_BROKEN_REALPATH as I recommended you to do in the last comment?
[25 Oct 2005 14:54]
Hanno Wagner
I just compiled 4.1.15 with the mentioned Directive. We'll see what happens.
[25 Oct 2005 16:48]
Valeriy Kravchuk
OK. Inform about the (bad) results with 4.1.15 as soon as you'll get them.
[2 Nov 2005 19:19]
Hanno Wagner
Since the change nothing failed anymore, so I think we can close this bug. Thanks for your help!
[3 Nov 2005 7:27]
Valeriy Kravchuk
Closed per reporter request. -DHAVE_BROKEN_REALPATH solves this problem on NetBSD. Thanks to Sergei Golubchik (and Jeremy Zavodny!) for the solution.