MySQL is breaking my heart

Ask the few things google does not know

Moderator: Dictators in Training

MySQL is breaking my heart

Postby Donnel » Wed Aug 10, 2005 8:37 am

Running a mysql server on my machine at home, and for some reason I had a system lockup last night. First one in months. Anyway, computer came back on, and now MYSQL is acting as if it doesn't have any data in it.

It's only showing 1 database "test" even though none of the data directory has changed.

How can I get mysql to see the folders in the data directory again? Also, since the mysql folder isn't showing, it's apparently not seeing that I can log in or anything like that.

Help! I'm pretty good with running queries and stuff, but I don't know how to resolve this.
<a href="http://wow.allakhazam.com/profile.html?384300">Treston</a>
Donnel
NT Traveller
NT Traveller
 
Posts: 2126
Joined: Wed Mar 10, 2004 9:00 am

Postby Lyion » Wed Aug 10, 2005 9:16 am

Run the following, Don

login as root with: su -
Shutdown mysql # mysqladmin shutdown
cd to your db dir # cd /usr/local/var/database
run an integrity test # myisamchk *
restart and see # /etc/init.d/mysql restart
What saves a man is to take a step. Then another step.
C. S. Lewis
User avatar
Lyion
Admin Abuse Squad
Admin Abuse Squad
 
Posts: 14376
Joined: Wed Mar 10, 2004 1:42 pm
Location: Ohio

Postby Donnel » Wed Aug 10, 2005 9:18 am

now say that again in windows-ese

I havn't got my linux box setup yet so I'm runnning it from Win XP home
<a href="http://wow.allakhazam.com/profile.html?384300">Treston</a>
Donnel
NT Traveller
NT Traveller
 
Posts: 2126
Joined: Wed Mar 10, 2004 9:00 am

Postby Lyion » Wed Aug 10, 2005 9:20 am

See if you can do an integrity check with a version of myisamchk on windows after shutting mysql down.

I'll check the windows docs and see if I can find anything.
What saves a man is to take a step. Then another step.
C. S. Lewis
User avatar
Lyion
Admin Abuse Squad
Admin Abuse Squad
 
Posts: 14376
Joined: Wed Mar 10, 2004 1:42 pm
Location: Ohio

Postby Donnel » Wed Aug 10, 2005 9:26 am

Thanks, unfortuneately I've also NOT setup a way to connect from work to my home computer, so i gotta wait til I get home to try any of this.
<a href="http://wow.allakhazam.com/profile.html?384300">Treston</a>
Donnel
NT Traveller
NT Traveller
 
Posts: 2126
Joined: Wed Mar 10, 2004 9:00 am

Postby Lyion » Wed Aug 10, 2005 9:29 am

Partition your windows machine and install Linux. For a server, you'll be MUCH happier you did.
What saves a man is to take a step. Then another step.
C. S. Lewis
User avatar
Lyion
Admin Abuse Squad
Admin Abuse Squad
 
Posts: 14376
Joined: Wed Mar 10, 2004 1:42 pm
Location: Ohio

Postby Donnel » Wed Aug 10, 2005 9:37 am

Yeah I know...

I've actually got a seperate box almost ready to go. I just need a little extra cash to buy a hard drive for it. Once that's setup, it will be the new web server.
<a href="http://wow.allakhazam.com/profile.html?384300">Treston</a>
Donnel
NT Traveller
NT Traveller
 
Posts: 2126
Joined: Wed Mar 10, 2004 9:00 am

Postby Gidan » Wed Aug 10, 2005 6:41 pm

Just a warning, mysql and windows is well iffy. We offer it to our customers but by the end of the sale we usually have them switched over to a linux box. Windows does a shitty job with MySQL recovery.

For your specifc issue, How many databases should you have (not including the test db). Its posible that a pointer just got thrown off or deleted for some reason on the crash. Having the entire database disapear is a bad thing and will be very difficult to repair. MySQL has alot of repair tools built in for files but for the actual database it doesn't

Please say you do regular backups, if not I hope this is the little kick you needed to start.
For to win one hundred victories in one hundred battles is not the acme of skill. To subdue the enemy without fighting is the acme of skill.
User avatar
Gidan
Admin Abuse Squad
Admin Abuse Squad
 
Posts: 2892
Joined: Tue Jan 04, 2005 11:01 am

Postby Donnel » Thu Aug 11, 2005 11:57 pm

Had one database not including Test.

I had just set it up and hadn't gotten started backing up yet.

Literally it had been running for like two days. Lost about 3 posts on the message board and about 7 registrations, and that's it. Not a huge loss.

I'm backing up now for tru.
<a href="http://wow.allakhazam.com/profile.html?384300">Treston</a>
Donnel
NT Traveller
NT Traveller
 
Posts: 2126
Joined: Wed Mar 10, 2004 9:00 am

Postby Gidan » Fri Aug 12, 2005 12:03 am

Backups are a sys admins best friend. I back up all my DB's every Mon, Wed and Thur on the slow sights and Every night on the busy ones. At all times I can restore my DB up to 2 weeks back.
For to win one hundred victories in one hundred battles is not the acme of skill. To subdue the enemy without fighting is the acme of skill.
User avatar
Gidan
Admin Abuse Squad
Admin Abuse Squad
 
Posts: 2892
Joined: Tue Jan 04, 2005 11:01 am

Postby Captain Insano » Fri Aug 12, 2005 3:16 am

Donnel wrote:Yeah I know...

I've actually got a seperate box almost ready to go. I just need a little extra cash to buy a hard drive for it. Once that's setup, it will be the new web server.



I don't mean to piss in your wheaties by why are you running all this from home?

I used to run all kinds of servers from home, web, exchange, sql etc etc in the years past....

but in this day and age, for maybe 10 or 15 bucks a month you can have it all done by someone else without all the hassle.

If you take the cost of even one piece of shit server you could pay for all the hosting for years to come pending your bandwidth isn't through the roof.

http://www.1and1.com will make your life a lot easier.
Tossica: No, you're gay because you suck on cocks.

Darcler:
Get rid of the pictures of the goofy looking white guy. That opens two right there.

Mazzletoffarado: That's me fucktard
Vivalicious wrote:Lots of females don't want you to put your penis in their mouths. Some prefer it in their ass.
User avatar
Captain Insano
Nappy Headed Ho
Nappy Headed Ho
 
Posts: 8368
Joined: Fri Apr 16, 2004 1:04 pm
Location: SoCal

Postby Gidan » Fri Aug 12, 2005 6:02 am

Just make sure no one like Steve Gunnels is hosting your shit. He has screwed a good number of people out of a shitload of money and all the data they had stored on the servers.

If you choose to host, do some looking into the place your hosting. I recomend http://hostgator.com/ The owner is a good, very intelligent guy who really knows what he is doing and the hardware is hosted on a great system.
Last edited by Gidan on Fri Aug 12, 2005 5:13 pm, edited 1 time in total.
For to win one hundred victories in one hundred battles is not the acme of skill. To subdue the enemy without fighting is the acme of skill.
User avatar
Gidan
Admin Abuse Squad
Admin Abuse Squad
 
Posts: 2892
Joined: Tue Jan 04, 2005 11:01 am

Postby Donnel » Fri Aug 12, 2005 8:19 am

Because I don't have 10 or 15$ a month.

I have DSL, a domain name I paid 9.20$ for and domain routing through http://www.afraid.org.

I have a box that I've scraped together that just needs a hard drive, and since it's running linux I don't even need a very good box ;)
<a href="http://wow.allakhazam.com/profile.html?384300">Treston</a>
Donnel
NT Traveller
NT Traveller
 
Posts: 2126
Joined: Wed Mar 10, 2004 9:00 am


Return to Tech Support

Who is online

Users browsing this forum: No registered users and 16 guests