Page 1 of 1

MySQL is breaking my heart

Posted: Wed Aug 10, 2005 8:37 am
by Donnel
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.

Posted: Wed Aug 10, 2005 9:16 am
by Lyion
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

Posted: Wed Aug 10, 2005 9:18 am
by Donnel
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

Posted: Wed Aug 10, 2005 9:20 am
by Lyion
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.

Posted: Wed Aug 10, 2005 9:26 am
by Donnel
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.

Posted: Wed Aug 10, 2005 9:29 am
by Lyion
Partition your windows machine and install Linux. For a server, you'll be MUCH happier you did.

Posted: Wed Aug 10, 2005 9:37 am
by Donnel
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.

Posted: Wed Aug 10, 2005 6:41 pm
by Gidan
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.

Posted: Thu Aug 11, 2005 11:57 pm
by Donnel
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.

Posted: Fri Aug 12, 2005 12:03 am
by Gidan
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.

Posted: Fri Aug 12, 2005 3:16 am
by Captain Insano
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.

Posted: Fri Aug 12, 2005 6:02 am
by Gidan
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.

Posted: Fri Aug 12, 2005 8:19 am
by Donnel
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 ;)