Gentoo Forums
Gentoo Forums
Quick Search: in
(solved) MySQL 5.0.44-r1 just stopped working.
View unanswered posts
View posts from last 24 hours

rackathon
 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
StifflerStealth
l33t
l33t


Joined: 03 Jul 2002
Posts: 929

PostPosted: Sun Nov 11, 2007 9:27 pm    Post subject: (solved) MySQL 5.0.44-r1 just stopped working. Reply with quote

The lost time I had compiled MySQL was: Thu Sep 6 05:34:58 2007 and all this time it was working fine. Then today I noticed that I could not login to MySQL to add a table, so I restarted MySQL, but I get this error:
Quote:
# /etc/init.d/mysql --verbose start
* Starting ...
* Starting (/etc/mysql/my.cnf)
* start-stop-daemon: caught an interrupt
* start-stop-daemon: /usr/sbin/mysqld died
* MySQL NOT started (1) [ !! ]
* ERROR: mysql failed to start
That's not very helpful output. Thinking that something was wrong, I decided to recompile it's deps and mysql itself. So I ran the command:
emerge sys-devel/libtool dev-libs/openssl sys-apps/texinfo sys-libs/readline sys-libs/zlib sys-apps/ed dev-perl/DBD-mysql dev-db/mysql-init-scripts dev-db/mysql

That finished and I restarted the computer to try to clear any temp data from memory to make a clean start of MySQL, however that did not work. It still will not start. How can I go about fixing this?

I have made no changes to the conf file, so I don't know what can be wrong. Could it be my recent update to Baselayout 2.0.0_rc6?


Last edited by StifflerStealth on Mon Nov 12, 2007 2:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
tranquilcool
l33t
l33t


Joined: 25 Mar 2005
Posts: 826

PostPosted: Mon Nov 12, 2007 2:07 am    Post subject: Reply with quote

try;

1) check permissions on /var/lib/mysql
shoud be mysql:mysql

2) check /var/run/mysqld to see if
any mysqld.pid is hanging around. remove it if it is.

3) do;
/etc/init.d/mysql zap

then try

4) /etc/init.d/mysql start

hope it helps!
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
StifflerStealth
l33t
l33t


Joined: 03 Jul 2002
Posts: 929

PostPosted: Mon Nov 12, 2007 9:53 am    Post subject: Reply with quote

No go. My problem is a little more complex than a left over pid file. ;) I tried starting it manually with:
~ # mysqld_safe --datadir /var/lib/mysql --verbose --user=mysql
nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
071112 08:38:25 mysqld ended

But, as you can tell that did not work either. :( Is there any way I can back up my databases without actually having mysql running? Like convert them all to sql files and then uninstall mysql, remove everything as if I never had it installed, then recreate the users I had and import the databases? What all would I need to manually remove?
Back to top
View user's profile Send private message
StifflerStealth
l33t
l33t


Joined: 03 Jul 2002
Posts: 929

PostPosted: Mon Nov 12, 2007 11:09 am    Post subject: Reply with quote

I reinstalled it I think. I need to test if it works now. :P I fif a find / -name *mysql* and removed anything that looked like to belonged to mysql.

EDIT: It finally starts after re-running the install db script thing.

I saved all my databases to a different directory. Can I just copy them over to the database directory and MySQL will use them?

EDIT 2: I moved the folders over to the database directory. I can see the databases in Webmin, but when I try to access them, I get:
SQL show index from `ART` failed : Can't find file: './artgallery/ART.frm' (errno: 13)

How do I make my copied over databases usable again?
Back to top
View user's profile Send private message
tranquilcool
l33t
l33t


Joined: 25 Mar 2005
Posts: 826

PostPosted: Mon Nov 12, 2007 12:48 pm    Post subject: Reply with quote

don't know how i can help.
you did so many wrong things at the same time.

for backups and restore with mysql, it's safe to use
mysqldump or mysqlhotcopy for MyISAM tables.

check man mysqldump. i say this so you know for another time or maybe mysqldump
can still help.
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
StifflerStealth
l33t
l33t


Joined: 03 Jul 2002
Posts: 929

PostPosted: Mon Nov 12, 2007 2:06 pm    Post subject: Reply with quote

Well, in order to use mysqldump, you need to have mysql started. I already tried to use mysql dump.

And I got it working. I had to chown the directories that copied over to mysql:mysql and then the databases started to work again. I just had to add my users back in and set their permissions, but all is go now. :) I think what happened was that the mysql database got corrupted. So, after removing mysql, deleting all associated remaining files, then reinstalling it, running the install db program to get a new clean mysql directory, and then copying over my other DBs it works now. :)
Back to top
View user's profile Send private message
tranquilcool
l33t
l33t


Joined: 25 Mar 2005
Posts: 826

PostPosted: Mon Nov 12, 2007 3:01 pm    Post subject: Reply with quote

am happy you had the problems solved.

that's why i love linux.
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum