View Full Version : I totally hosed my MySQL database, but I have vbulletin.sql...
Jwoodall
Tue 21st Jan '03, 1:38am
I screwed it up myself. I didn't shut down the forums before attempting to repair this error (using repair.php~etc...):
Database error in vBulletin 2.2.9:
Invalid SQL: SELECT wordid,title FROM word WHERE title IN ('test')
mysql error: Can't open file: 'word.MYD'. (errno: 145)
mysql error number: 1016
Date: Monday 20th of January 2003 11:54:14 PM
Script: http://jupiter.phpwebhosting.com/~rooster/lol/forums/~rooster/lol/forums/newreply.php
Referer: http://jupiter.phpwebhosting.com/~rooster/lol/forums/newreply.php?s=&action=newreply&threadid=1977
I have my entire database (50MB'ish) on my drive in "vbulletin.sql" format. But since not even the admin panel works now, I don't know what to do.
Please have patience with my ignorance and stupidity (I already feel bad enough as it is.)
Thanks
eva2000
Tue 21st Jan '03, 6:59am
Originally posted by Jwoodall
I screwed it up myself. I didn't shut down the forums before attempting to repair this error (using repair.php~etc...):
I have my entire database (50MB'ish) on my drive in "vbulletin.sql" format. But since not even the admin panel works now, I don't know what to do.
Please have patience with my ignorance and stupidity (I already feel bad enough as it is.)
Thanks
[/size] it's not lost, if you have not dropped your database (delete it manually), then it's still repairable
try repairing using these 2 methods if you have root server access, if not you need to get your host to perform one of these options
1. using mysqlcheck repair for 3.23.38 and above
i.e. in shell/telnet/ssh type while mysql is running and forum is CLOSED:
mysqlcheck -r -u mysqlusername -p databasename
2. or via myisamchk repair functions while mysql is shutdown/stopped in shell/telnet/ssh type :
myisamchk -r -u root -p databasename
Jwoodall
Tue 21st Jan '03, 1:05pm
I know I have access to it, via Secure Telnet, but I can't seem to find the Secure Telnet software I used when I backed it up when I upgraded from 2.2.2 to 2.2.8.
I backed it up this time using the Admin panel in 2.2.8
I looked the MySQL control panel my Host provides, and my database now says 3.8MB instead of 50MB'ish. As well, some show as Open.
A) Where can I get a secure telnet program?
B) How do I shutdown or stop my MySQL?
eva2000
Tue 21st Jan '03, 1:07pm
Originally posted by Jwoodall
I know I have access to it, via Secure Telnet, but I can't seem to find the Secure Telnet software I used when I backed it up when I upgraded from 2.2.2 to 2.2.8.
I backed it up this time using the Admin panel in 2.2.8
I looked the MySQL control panel my Host provides, and my database now says 3.8MB instead of 50MB'ish. As well, some show as Open.
A) Where can I get a secure telnet program?
B) How do I shutdown or stop my MySQL? putty is free at http://www.chiark.greenend.org.uk/~sgtatham/putty/
to stop and start mysql try
/etc/rc.d/init.d/mysql stop
/etc/rc.d/init.d/mysql start
works on most servers
Jwoodall
Tue 21st Jan '03, 1:10pm
Tried #1 and got the following:
rooster.access
error : 28 when fixing table
status : Operation failed
rooster.accessbackup
error : 28 when fixing table
status : Operation failed
rooster.adminlog
error : 28 when fixing table
status : Operation failed
rooster.adminutil
error : 28 when fixing table
status : Operation failed
rooster.announcement OK
rooster.attachment
error : 28 when writing to datafile
error : 28 when writing to datafile
status : Operation failed
rooster.avatar
error : 28 when fixing table
status : Operation failed
rooster.avatar_categories
error : 28 when fixing table
status : Operation failed
rooster.bbcode
error : 28 when fixing table
status : Operation failed
rooster.calendar_events
error : 28 when fixing table
status : Operation failed
rooster.customavatar
error : 28 when fixing table
status : Operation failed
rooster.forum
error : 28 when fixing table
status : Operation failed
rooster.forumpermission
error : 28 when fixing table
status : Operation failed
rooster.icon
error : 28 when fixing table
status : Operation failed
rooster.moderator
error : 28 when fixing table
status : Operation failed
rooster.nuke_advblocks
error : 28 when fixing table
status : Operation failed
rooster.nuke_advheadlines
error : 28 when fixing table
status : Operation failed
rooster.nuke_banner
error : 28 when fixing table
status : Operation failed
rooster.nuke_bannerclient OK
rooster.nuke_bannerfinish OK
rooster.nuke_centerblocks
error : 28 when fixing table
status : Operation failed
rooster.nuke_counter
error : 28 for record at pos 368
status : Operation failed
rooster.nuke_downloads_categories OK
rooster.nuke_downloads_downloads OK
rooster.nuke_downloads_editorials OK
rooster.nuke_downloads_modrequest OK
rooster.nuke_downloads_newdownload
error : 28 when fixing table
status : Operation failed
rooster.nuke_downloads_subcategories OK
rooster.nuke_downloads_votedata OK
rooster.nuke_ephem
error : 28 when fixing table
status : Operation failed
rooster.nuke_faqAnswer
error : 28 when fixing table
status : Operation failed
rooster.nuke_faqCategories
error : 28 when fixing table
status : Operation failed
rooster.nuke_forumblocks
error : 28 when fixing table
status : Operation failed
rooster.nuke_links_categories OK
rooster.nuke_links_editorials OK
rooster.nuke_links_links
error : 28 when fixing table
status : Operation failed
rooster.nuke_links_modrequest
error : 28 when fixing table
status : Operation failed
rooster.nuke_links_newlink OK
rooster.nuke_links_subcategories OK
rooster.nuke_links_votedata OK
rooster.nuke_message
error : 28 for record at pos 0
status : Operation failed
rooster.nuke_referer
error : 28 when fixing table
status : Operation failed
rooster.nuke_reviews
error : 28 when fixing table
status : Operation failed
rooster.nuke_reviews_add OK
rooster.nuke_reviews_comments OK
rooster.nuke_reviews_main
error : 28 for record at pos 0
status : Operation failed
rooster.nuke_seccont OK
rooster.nuke_sections OK
rooster.poll
error : 28 when fixing table
status : Operation failed
rooster.pollvote
error : 28 when fixing table
status : Operation failed
rooster.post
error : 28 when writing to datafile
error : 28 when writing to datafile
status : Operation failed
rooster.privatemessage
error : 28 when writing to datafile
error : 28 when writing to datafile
status : Operation failed
rooster.profilefield
error : 28 when fixing table
status : Operation failed
rooster.replacement
error : 28 when fixing table
status : Operation failed
rooster.replacementset
error : 28 when fixing table
status : Operation failed
rooster.search
error : 28 when fixing table
status : Operation failed
rooster.searchindex
error : 28 when writing to datafile
error : 28 when writing to datafile
status : Operation failed
rooster.session
error : The handler for the table doesn't support check/repair
rooster.setting
error : 28 when fixing table
status : Operation failed
rooster.settinggroup
error : 28 when fixing table
status : Operation failed
rooster.smilie
error : 28 when fixing table
status : Operation failed
rooster.style
error : 28 when fixing table
status : Operation failed
rooster.subscribeforum
error : 28 when fixing table
status : Operation failed
Jwoodall
Tue 21st Jan '03, 1:13pm
I'm not getting a response at all when I try starting or stopping the mysql.
eva2000
Tue 21st Jan '03, 1:19pm
Originally posted by Jwoodall
I'm not getting a response at all when I try starting or stopping the mysql. contact your web host looks like your mysql data partition maybe full
type as root user in ssh
df -h
and post the results
IMPORTANT: for now keep forum closed from activity
Jwoodall
Tue 21st Jan '03, 1:25pm
[$user.server$]$ myisamchk -r -u root -p rooster
myisamchk: invalid option -- p
Jwoodall
Tue 21st Jan '03, 1:28pm
Originally posted by eva2000
contact your web host looks like your mysql data partition maybe full
type as root user in ssh
df -h
and post the results
IMPORTANT: for now keep forum closed from activity http://rooster.phpwebhosting.com/pics/eva.gif
I know that's not all me. I don't use that much space!
Now, currently, I can't access my control panel: it says it's down for maintenance. So perhaps they're aware of the situation on /dev/sda7
Jwoodall
Tue 21st Jan '03, 1:50pm
cat: /var/lib/mysql/jupiter.phpwebhosting.com.pid: Permission denied
Killing mysqld with pid
Wait for mysqld to exit\c
.\c
.\c
.........
(keeps going)
Hrm... guess I can't do that. :(
eva2000
Tue 21st Jan '03, 2:23pm
/var partition is 100% full hence the error 28 and not able to repair, since repair functions need working free space in /var or where ever mysql data resides to work...
Jwoodall
Tue 21st Jan '03, 2:26pm
They fixed it, it had about 40MB free when I tried and got the above result.
Jwoodall
Tue 21st Jan '03, 3:29pm
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 99M 73M 21M 78% /
/dev/sda6 988M 769M 169M 82% /usr
/dev/sda7 988M 841M 97M 90% /var
/dev/sda8 6.3G 5.8G 125M 98% /home
/dev/sdb1 8.4G 7.2G 752M 91% /home2
eva2000
Tue 21st Jan '03, 4:57pm
mysql repair needs at least 2 to 3 times in available free space, as the largest mysql database table that exists on your database
Jwoodall
Wed 22nd Jan '03, 3:01am
So this: cat: /var/lib/mysql/jupiter.phpwebhosting.com.pid: Permission deniedDoesn't mean I don't have access to do it?
Since it seems to be all FUBAR'd... would this be easier if I were to just restore the database?
eva2000
Wed 22nd Jan '03, 10:05am
Originally posted by Jwoodall
So this: Doesn't mean I don't have access to do it?
Since it seems to be all FUBAR'd... would this be easier if I were to just restore the database? what you trying to do ? if you are on shared host server, you need for your web host to shutdown mysql and repair all databases
Jwoodall
Wed 22nd Jan '03, 1:26pm
Pardon my ignorance, but wouldn't that require the host shut down the MySQL for that entire server?
Steve Machol
Wed 22nd Jan '03, 1:41pm
As George said, what are you trying to do when you get this error?
vBR
Wed 22nd Jan '03, 3:06pm
Originally posted by Steve Machol
As George said, what are you trying to do when you get this error? eva2000 = George? http://homepage.ntlworld.com/dreamscape42/ico/eek5.gif I figured on Shinji for sure.
Jwoodall
Thu 23rd Jan '03, 2:52am
Well, as Eva suggested, I talked to my host. Thanks a million for stickin with me Eva. :D
They were able to get 99% of it fixed.
Now I just get this on my vbPortal home page (www.legionoflions.com (http://www.legionoflions.com)):
Warning: MySQL: Unable to save result set in /home2/rooster/www/lol/forums/admin/db_mysql.php on line 93with this below in a little box:Database error in vBulletin 2.2.9:
Invalid SQL: SELECT userid, username, birthday FROM user WHERE birthday LIKE '%-01-23'
mysql error: Got error 127 from table handler
mysql error number: 1030
Date: Thursday 23rd of January 2003 01:43:53 AM
Script: http://forums.legionoflions.com/~rooster/lol/index.php?
Referer: http://jupiter.phpwebhosting.com/~rooster/lol/forums/index.php?
eva2000
Thu 23rd Jan '03, 3:41am
error 127 is another corruption of the user table according to that error, you need to rerun repair from 1 of the 2 methods i mentioned in my first reply
Jwoodall
Thu 23rd Jan '03, 10:58am
Ugh, and now it's back to total fubar. :(
I'll contact my host again.
Jwoodall
Fri 24th Jan '03, 4:24pm
Well, they've repaired it about 3 or 4 times now.
Now I get this error:
Warning: MySQL: Unable to save result set in /home2/rooster/www/lol/forums/admin/db_mysql.php on line 93
And this showing in my Database control panel:
Table: Session
Records: 0
Type: HEAP
Size 1.5MB
(only odd thing I see)
eva2000
Fri 24th Jan '03, 4:38pm
from the source code of error page i see
<!-- Database error in vBulletin :
Invalid SQL: SELECT template FROM template WHERE title='options'
mysql error: Got error 127 from table handler
mysql error number: 1030
Date: Friday 24th of January 2003 03:31:56 PM
Script: /~rooster/lol/forums/
Referer: http://forums.legionoflions.com/
-->
which is even more corruption.. how is your host doing the repair ? did he shutdown mysql first ?
Jwoodall
Fri 24th Jan '03, 4:43pm
I will ask. I don't know if he shut it down or not.
I would imagine...
Here's what he did do...Hi,
mysisamchk -s
reported:
myisamchk: ISAM file template.MYI
myisamchk: error: Wrong bytesec: 0-0-0 at linkstart: 472144
MyISAM-table 'template.MYI' is corrupted
Fix it using switch "-r" or "-o"
myisamchk: ISAM file thread.MYI
myisamchk: error: Size of datafile is: 144692 Should be: 144956
myisamchk: error: Found key at page 14336 that points to record outside datafile
myisamchk: error: Record-count is not ok; is 1761 Should be: 1763
myisamchk: warning: Found 1761 parts Should be: 1765 parts
MyISAM-table 'thread.MYI' is corrupted
Fix it using switch "-r" or "-o"
myisamchk: MyISAM file user.MYI
myisamchk: warning: 1 clients is using or hasn't closed the table properly
MyISAM-table 'user.MYI' is usable but should be fixed
I ran it again with -r and now -s reports zero errors. However I tested your webpage and it looks like your forum is still not up. Looks like it may be a script issue though.
Best Regards,
Greg
eva2000
Fri 24th Jan '03, 7:10pm
if you run myisamchk, mysql server must be shut down or you could screw things up even more
Jwoodall
Fri 24th Jan '03, 11:45pm
Well, I hope he knows what he's doing. I'll forward your concern to him.
I don't have the ability to shut down MySQL on the entire server (it's a shared host I'm sure).
vBulletin® v3.8.0 Beta 3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.