LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-20-2006, 09:11 AM   #1
mclinkor
Member
 
Registered: Nov 2005
Posts: 63

Rep: Reputation: 15
MySQL Server won't start in Gentoo


I had MySQL and everything working fine and then yesterday ran emerge -u world. This seems to have killed mysql though.

When I try to run /etc/init.d/mysql start, I get: "MySQL NOT started (0)"

When I run /usr/bin/mysqld_safe & mysqladmin -u root password '[passwd here]' , I get:

can't connect to local mysql server through socket '/var/run/mysqld/mysqld.sock' (2)
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

Well, mysqld is not running (that's what I'm trying to do) and the directory /var/run/mysqld/ is empty, so this socket doesn't seem to exist.

I have no idea what socket I used before since it used to just work.

btw, mysql does seem to start on startup, but doesn't seem to work properly. When I run

/etc/init.d/mysql restart, it gives me:

Stopping mysql...
/etc/init.d/mysql: line 334: /var/run/mysqld/mysqld.pid: No such file or directory
Stopping mysqld (0)
...
Strange, the socket file already exist in "/var/run/mysqld/mysqld.sock"
it will be removed now and re-created by the MySQL server
BUT please make our checks.
Starting mysql (/etc/mysql/my.cnf)
MySQL NOT started (0)

I'm not sure if there are repair utilities I can use or what log files to look into.

Thanks.

- Ryan

Last edited by mclinkor; 09-20-2006 at 10:09 AM.
 
Old 09-20-2006, 10:32 AM   #2
mclinkor
Member
 
Registered: Nov 2005
Posts: 63

Original Poster
Rep: Reputation: 15
I've now looked under /var/log/mysql/mysql.err and get the following:

Can't start server: Bind on TCP/IP port: Address already in use

Do you already have another mysqld server unnon on port: 3306

Aborting
 
Old 09-20-2006, 10:48 AM   #3
mjones490
Member
 
Registered: Sep 2005
Distribution: LFS
Posts: 60

Rep: Reputation: 22
Have you tried issuing killall mysqld and killall mysqld_safe?

Thanks,
Mark
 
Old 09-20-2006, 11:22 AM   #4
mclinkor
Member
 
Registered: Nov 2005
Posts: 63

Original Poster
Rep: Reputation: 15
When I try any of those, I get "no processes killed"
 
Old 09-20-2006, 11:25 AM   #5
mclinkor
Member
 
Registered: Nov 2005
Posts: 63

Original Poster
Rep: Reputation: 15
One other thing, when I reboot the machine, mysql is supposedly running and mysqld.pid and mysqld.sock are present. But, when I try to restart mysqld, they go away.
 
Old 09-20-2006, 11:49 AM   #6
mjones490
Member
 
Registered: Sep 2005
Distribution: LFS
Posts: 60

Rep: Reputation: 22
Do this: Go into your /etc/init.d/mysql script. There should be something toward the top about using sockets and to uncomment (or comment out, I forget exactly which) a line in that script to not use sockets. I did this a couple months back. It's pretty self explanatory.

Then do a mysql restart. You should then be able to connect.

Thanks,
Mark
 
Old 09-20-2006, 01:05 PM   #7
mclinkor
Member
 
Registered: Nov 2005
Posts: 63

Original Poster
Rep: Reputation: 15
That did the trick.

This must be one the changes from the previous version of mysql to this one.

Thank you much.

- Ryan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql server does not start up prasanta Linux - Newbie 2 01-05-2006 01:07 PM
Trying to start Mysql server number11 Linux - Newbie 3 06-06-2005 01:59 PM
start server at boot in gentoo? snipes420 Linux - Newbie 1 12-08-2004 08:26 PM
MySQL server doesn't want to start AJ_Cantos Linux - Software 7 11-29-2004 04:24 PM
gentoo: problems on X-server start atom Linux - Hardware 2 11-11-2004 11:04 AM


All times are GMT -5. The time now is 09:32 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration