Bug 22989 - Can't start mysqld
Can't start mysqld
Product: Red Hat Linux
Classification: Retired
Component: mysql (Show other bugs)
i686 Linux
high Severity high
: ---
: ---
Assigned To: Patrick Macdonald
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2000-12-29 13:47 EST by Need Real Name
Modified: 2005-10-31 17:00 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-01-05 01:08:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2000-12-29 13:47:17 EST
After a new installation of redhat 7.0 on a Dell Dimension4100 PC, as root 
try to start mysql server:
[root@jhan-home-dell mysql]#cd /usr/bin
[root@jhan-home-dell bin]#mysql_install_db
[root@jhan-home-dell bin]#safe_mysqld &
It starts but exits immedialtely. Check /var/lib/mysql/jhan-home-dell.err,
it has error message:
Can't open host.frm (error code 13). 

Then I upgraded following packages:

and try to start mysqld again. This time it gives a different problem.
It seems that the main process keeps create child processes but all child 
processes die immedialtely. I have to use kill -9 to kill the main process.
Check /var/lib/mysql/jhan-home-dell.err, it has these error messages:

Number of processes running now: 0 
001227 22:35:20 mysqld restarted 
001227 22:35:21 Can't start server : Bind on unix socket: Permission 
001227 22:35:21 Do you already have another mysqld server running on 
socket: /var/lib/mysql/mysql.sock ? 
001227 22:35:21 Aborting
Comment 1 Need Real Name 2000-12-29 13:51:08 EST
See Service Request 165972 for more information
Comment 2 Trond Eivind Glomsrxd 2000-12-30 08:04:06 EST
The way to start mysql is by running "service mysql start" (or
/etc/rc.d/init.d/mysqld start directly). As the error message says, you could
already have a mysqld process running (and the first one was resolved by an
errata on the day of release)
Comment 3 Need Real Name 2001-01-03 01:14:47 EST
I'm sure mysqld is not running.

[root@jhan-home-dell /root]# mysql -version
ERROR 2002: Can't connect to local MySQL server through 
socket '/var/lib/mysql/mysql.sock' (111)
[root@jhan-home-dell /root]# ps -ax | grep mysql
 1190 pts/0    S      0:00 grep mysql
Comment 4 Trond Eivind Glomsrxd 2001-01-03 05:55:51 EST
And if you try starting it with "service mysqld start"?
Comment 5 Need Real Name 2001-01-04 01:04:40 EST
I tried "service mysqld start", the result is same as "safe_mysqld". The main
process is started and running. But it seems to spawn child process and the
child process dies immediately. And the main process keeps spawn child process.
I can tell that by ps:
[root@jhan-home-dell /root]# service mysqld start
Starting MySQL:					[OK]
[root@jhan-home-dell /root]# ps -ax | grep mysqld
 9321 pts/0	S	0:00 sh /usr/bin/safe_mysqld --user=mysql --log=/var/log
11466 pts/0	R	0:00 sh /usr/bin/safe_mysqld --user=mysql --log=/var/log
[root@jhan-home-dell /root]# ps -ax | grep mysqld
 9321 pts/0	S	0:00 sh /usr/bin/safe_mysqld --user=mysql --log=/var/lib
11738 pts/0	S	0:00 sh /usr/bin/safe_mysqld --user=mysql --log=/var/lib
11739 pts/0	R	0:00 sh /usr/bin/safe_mysqld --user=mysql --log=/var/lib
11740 pts/0	R	0:00 date +%y%m%d %H:%M:%S mysqld restarted

And each child process logs an error message in
/var/lib/mysql/jhan-home-dell.err before die. The log file getting big quickly.
Comment 6 Trond Eivind Glomsrxd 2001-01-04 08:36:09 EST
This program was checked before releasing, without this occuring.

What is the permissions on /var/lib/mysql?
Have you specified something in a configuration file?
Do you have all errata installed?
Comment 7 Need Real Name 2001-01-05 01:08:50 EST
OK, I figure out what's wrong. I have to chmod
/var/lib/mysql and /var/lib/mysql/mysql from 700 to 760.
This solves the problem.
Comment 8 Trond Eivind Glomsrxd 2001-01-08 11:51:35 EST
This directory should have received the proper permissions after updateing - and
have always done so in our internal testing. However, to be absolutely sure I've
now added an explicit chmod command to the post install script in 3.23.30-1.

Note You need to log in before you can comment on or make changes to this bug.