Bug #13630 MySQL won't start after installing from RPM package
Submitted: 30 Sep 2005 3:48 Modified: 11 Oct 2005 6:35
Reporter: Yiju Lai Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:4.1.14 OS:Linux (Fedora Core 4)
Assigned to: CPU Architecture:Any

[30 Sep 2005 3:48] Yiju Lai
Description:
After installing from MySQL-server-4.1.14-0.i386.rpm package, MySQL could not be started:

[root@yiju yiju]# rpm -ivh MySQL-server-4.1.14-0.i386.rpm
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [100%]
050929 23:39:47 [Warning] Asked for 196608 thread stack, but got 126976
050929 23:39:47 [Warning] Asked for 196608 thread stack, but got 126976
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h yiju password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
Starting MySQL...................................[FAILED]
[root@yiju yiju]#

Here's the error log under /var/lib/mysql:

050929 23:39:47  mysqld started
050929 23:39:47  mysqld ended

But if I run mysqld_safe manually from a command shell, it does seem to work:

[root@yiju ~]# /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/mysqld.pid
Starting mysqld daemon with databases from /var/lib/mysql
(From this point on, I can login to MySQL from client programs)

How to repeat:
Install from MySQL-server-4.1.14-0.i386.rpm package on Fedora Core 4, MySQL would not be started automatically.
[30 Sep 2005 15:47] Valeriy Kravchuk
Thank you for a bug report.

Do you have any previous versions of mysql installed and running before the installation? Looks like mysqld was not able to start because default port and|or socket was busy...
[2 Oct 2005 15:56] Yiju Lai
No, it's a fresh FC 4 installation without any previous MySQL present.

Besides, if there were a previous version of MySQL that's presenting MySQL from starting, I would not be able to start it manually from a command shell either. But I was able to start it from a shell by typing in the "mysql_safed" command with the same parameters used by the auto-start script in /etc/init.d/mysql.
[3 Oct 2005 6:57] Valeriy Kravchuk
OK. So, /usr/bin/mysqld_safe --datadir=/var/lib/mysql
--pid-file=/var/lib/mysql/mysqld.pid command starts the server successfully, and the same command in /etc/init.d/mysql does not. Would you, please:

1. Stop the MySQL server if it runs, then try to run: /etc/init.d/mysql start and inform about the results.

2. Send the ls -l /etc/init.d/mysql command results. I want to check the ownership of the file.
[4 Oct 2005 0:36] Yiju Lai
[root@yiju ~]# ps -ef|grep mysql
root     24857 16746  0 20:33 pts/1    00:00:00 grep mysql
[root@yiju ~]# /etc/init.d/mysql stop
MySQL PID file could not be found!                         [FAILED]
[root@yiju ~]# /etc/init.d/mysql start
Starting MySQL...................................          [FAILED]
[root@yiju ~]# ls -l /etc/init.d/mysql
-rwxr-xr-x  1 root root 6303 Aug 24 06:16 /etc/init.d/mysql
[root@yiju ~]#
[5 Oct 2005 14:10] Valeriy Kravchuk
Sorry, but I was not able to repeat the behaviour you described on Fedora Core 1 (without MySQL running!):

[root@Fedora openxs]# rpm -ivh MySQL-server-4.1.14-0.i386.rpm
warning: MySQL-server-4.1.14-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [100%]
051005 17:01:08 [Warning] Asked for 196608 thread stack, but got 126976
051005 17:01:08 [Warning] Asked for 196608 thread stack, but got 126976
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h Fedora password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
Starting MySQL.... SUCCESS!
[root@Fedora openxs]# uname -a
Linux Fedora 2.4.22-1.2115.nptl #1 Wed Oct 29 15:42:51 EST 2003 i686 i686 i386 GNU/Linux

(But I've got similar problems when trying to install with mysqld aslready running on standard 3306 port) So, I believe, you have mysql installed already. Check RPM database, deinstall older versions (and this one, not working properly), and make a fresh RPM installation. It should work smoothly.
[9 Oct 2005 13:57] Yiju Lai
Maybe you could try to reproduce the bug on the same platform (using FC 4 instead of FC 1)?

I removed the MySQL 4.1.14 rpm package, made sure there's no MySQL process running on the system, then re-installed the same MySQL rpm package, and got the same MySQL start error:

[root@yiju xhli]# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 09:35 ?        00:00:01 init [5]
root         2     1  0 09:35 ?        00:00:00 [ksoftirqd/0]
root         3     1  0 09:35 ?        00:00:00 [watchdog/0]
root         4     1  0 09:35 ?        00:00:00 [events/0]
root         5     1  0 09:35 ?        00:00:00 [khelper]
root         6     1  0 09:35 ?        00:00:00 [kthread]
root         8     6  0 09:35 ?        00:00:00 [kacpid]
root        79     6  0 09:35 ?        00:00:00 [kblockd/0]
root        82     1  0 09:35 ?        00:00:00 [khubd]
root       128     6  0 09:35 ?        00:00:00 [pdflush]
root       129     6  0 09:35 ?        00:00:00 [pdflush]
root       131     6  0 09:35 ?        00:00:00 [aio/0]
root       130     1  0 09:35 ?        00:00:00 [kswapd0]
root       218     1  0 09:35 ?        00:00:00 [kseriod]
root       375     1  0 09:35 ?        00:00:00 [kjournald]
root       842     1  0 09:35 ?        00:00:00 udevd
root      1096     1  0 09:35 ?        00:00:00 [shpchpd_event]
root      1211     1  0 09:35 ?        00:00:00 [pccardd]
root      1322     1  0 09:35 ?        00:00:00 [kjournald]
root      1323     1  0 09:35 ?        00:00:00 [kjournald]
root      1494     1  0 09:35 ?        00:00:00 /sbin/cardmgr
root      1773     1  0 09:35 ?        00:00:03 syslogd -m 0
root      1775     1  0 09:35 ?        00:00:00 klogd -x
rpc       1785     1  0 09:35 ?        00:00:00 portmap
rpcuser   1803     1  0 09:35 ?        00:00:00 rpc.statd
root      1817     1  0 09:35 ?        00:00:00 auditd
root      1821     6  0 09:35 ?        00:00:00 [kauditd]
root      1845     1  0 09:35 ?        00:00:00 rpc.idmapd
root      1858     1  0 09:35 ?        00:00:00 hcid: processing events
root      1862     1  0 09:35 ?        00:00:00 sdpd
root      1881     1  0 09:35 ?        00:00:00 [krfcommd]
root      2015     1  0 09:35 ?        00:00:00 /usr/sbin/automount --timeout=60root      2048     1  0 09:35 ?        00:00:00 /usr/sbin/automount --timeout=60root      2061     1  0 09:35 ?        00:00:00 nifd -n
nobody    2093     1  0 09:35 ?        00:00:00 mDNSResponder
root      2102     1  0 09:35 ?        00:00:00 /usr/sbin/acpid
root      2231     1  0 09:36 ?        00:00:00 cupsd
root      2275     1  0 09:36 ?        00:00:00 /usr/sbin/sshd
root      2292     1  0 09:36 ?        00:00:00 sendmail: accepting connections
smmsp     2298     1  0 09:36 ?        00:00:00 sendmail: Queue runner@01:00:00
root      2307     1  0 09:36 ?        00:00:00 gpm -m /dev/input/mice -t imps2
root      2315     1  0 09:36 ?        00:00:00 crond
xfs       2336     1  0 09:36 ?        00:00:00 xfs -droppriv -daemon
root      2344     1  0 09:36 ?        00:00:00 anacron -s
root      2351     1  0 09:36 ?        00:00:00 /usr/sbin/atd
dbus      2359     1  0 09:36 ?        00:00:00 dbus-daemon --system
root      2371     1  0 09:36 ?        00:00:00 cups-config-daemon
root      2392     1  0 09:36 ?        00:00:00 hald --retain-privileges
root      2397  2392  0 09:36 ?        00:00:00 hald-addon-acpi
root      2406  2392  0 09:36 ?        00:00:00 hald-addon-storage
root      2430     1  0 09:36 tty1     00:00:00 /sbin/mingetty tty1
root      2431     1  0 09:36 tty2     00:00:00 /sbin/mingetty tty2
root      2432     1  0 09:36 tty3     00:00:00 /sbin/mingetty tty3
root      2433     1  0 09:36 tty4     00:00:00 /sbin/mingetty tty4
root      2434     1  0 09:36 tty5     00:00:00 /sbin/mingetty tty5
root      2435     1  0 09:36 tty6     00:00:00 /sbin/mingetty tty6
root      2436     1  0 09:36 ?        00:00:00 /bin/sh /etc/X11/prefdm -nodaemoroot      2479  2436  0 09:36 ?        00:00:00 /usr/bin/gdm-binary -nodaemon
root      2769  2479  0 09:36 ?        00:00:00 /usr/bin/gdm-binary -nodaemon
root      2778  2769  1 09:36 ?        00:00:11 /usr/X11R6/bin/X :0 -audit 0 -auroot      9066  2769  0 09:36 ?        00:00:00 /usr/bin/gnome-session
root      9147  9066  0 09:37 ?        00:00:00 /usr/bin/ssh-agent /usr/bin/dbusroot      9151     1  0 09:37 ?        00:00:00 /usr/bin/dbus-launch --exit-withroot      9153     1  0 09:37 ?        00:00:00 dbus-daemon --fork --print-pid 8root      9169     1  0 09:37 ?        00:00:00 /usr/libexec/gconfd-2 5
root      9226     1  0 09:37 ?        00:00:00 /usr/bin/gnome-keyring-daemon
root      9230     1  0 09:37 ?        00:00:00 /usr/libexec/bonobo-activation-sroot      9288     1  0 09:37 ?        00:00:00 /usr/libexec/gnome-settings-daemroot      9330     1  0 09:37 ?        00:00:00 /usr/libexec/gam_server
root      9424     1  0 09:37 ?        00:00:00 /usr/bin/metacity --sm-client-idroot      9452     1  0 09:37 ?        00:00:00 gnome-panel --sm-client-id defauroot      9457     1  0 09:37 ?        00:00:00 nautilus --no-default-window --sroot      9463     1  0 09:37 ?        00:00:00 gnome-volume-manager --sm-clientroot      9474     1  0 09:37 ?        00:00:00 eggcups --sm-client-id default5
root      9482     1  0 09:37 ?        00:00:00 pam-panel-icon --sm-client-id deroot      9484     1  0 09:37 ?        00:00:01 /usr/bin/python /usr/bin/rhn-approot      9487  9482  0 09:37 ?        00:00:00 /sbin/pam_timestamp_check -d rooroot      9536     1  0 09:37 ?        00:00:00 /usr/libexec/wnck-applet --oaf-aroot      9539     1  0 09:37 ?        00:00:00 /usr/libexec/gnome-vfs-daemon --root      9578     1  0 09:37 ?        00:00:00 /usr/libexec/mapping-daemon
root      9583     1  0 09:37 ?        00:00:00 /usr/libexec/clock-applet --oaf-root      9585     1  0 09:37 ?        00:00:00 /usr/libexec/notification-area-aroot      9587     1  0 09:37 ?        00:00:00 /usr/libexec/mixer_applet2 --oafroot     24432     1  0 09:37 ?        00:00:01 gnome-terminal
root     24489 24432  0 09:37 ?        00:00:00 gnome-pty-helper
root     24490 24432  0 09:37 pts/1    00:00:00 bash
root     27057 24432  0 09:38 pts/2    00:00:00 bash
root      7080 24490  0 09:39 pts/1    00:00:00 man rpm
root      7082  7080  0 09:39 pts/1    00:00:00 sh -c /usr/bin/bzip2 -c -d /var/root      7084  7082  0 09:39 pts/1    00:00:00 /usr/bin/less -is
root      7342     1  0 09:46 ?        00:00:00 /sbin/dhclient -1 -q -cf /etc/dhroot      7368     1  0 09:46 ?        00:00:00 /bin/sh /usr/lib/firefox-1.0.4/froot      7385  7368  0 09:46 ?        00:00:00 /bin/sh /usr/lib/firefox-1.0.4/rroot      7390  7385  3 09:46 ?        00:00:09 /usr/lib/firefox-1.0.4/firefox-broot      7473 27057  0 09:51 pts/2    00:00:00 ps -ef
[root@yiju xhli]# ps -ef|grep my
root      7476 27057  0 09:51 pts/2    00:00:00 grep my
[root@yiju xhli]# rpm -ivh MySQL-server-4.1.14-0.i386.rpm
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [100%]
051009  9:51:58 [Warning] Asked for 196608 thread stack, but got 126976
051009  9:51:58 [Warning] Asked for 196608 thread stack, but got 126976
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h yiju password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
Starting MySQL...................................[FAILED]
[root@yiju xhli]#
[9 Oct 2005 14:01] Yiju Lai
Another note: I'm installing on a laptap running FC4, is that a problem?

I'd been able to install MySQL 4.1.7 on a laptop running SuSe 9.1 as well as on Windows XP.
[10 Oct 2005 13:36] Valeriy Kravchuk
Please, try to download and install MySQL-server-4.1.14-0.glibc23.i386.rpm instead. Also, please, send the content of the error log (/var/lin.mysql/*.err) from the old installation attempts.

Is SELinux enabled on your machine?
[11 Oct 2005 1:58] Yiju Lai
Got it!

It is SELinux that's causing the problem: After I disabled SELinux by setting:

SELINUX=disabled

in /etc/sysconfig/selinux and restarted, the same MySQL 4.1.14 server can now be started and everything starts to work fine.

The question now is:

1. Is it a bug in SELinux or MySQL that MySQL won't start automatically if SELinux is enabled?

2. If it's a bug in MySQL, you should be enable to reproduce this bug easily by enabling SELinux first, then install MYSQL 4.1.14 from a RPM package.

Thanks for the hint to disable SELinux.
[11 Oct 2005 6:35] Lenz Grimmer
This bug was marked as a duplicate of BUG#12676

It's not a bug, but a difference in how the MySQL RPMs from Fedora and MySQL are packaged. The SELinux policy files of the distribution need to be modified to accomodate the MySQL AB RPM. See
the other bug report for more details.
[11 Nov 2005 23:58] [ name withheld ]
Never forget the obvious, at least for me. Reading this thread made me look at my security settings and guess what port 3306 was blocked. I openned 3306:tcp and Mysql-Server 5.0 started immediately after allowing that port. Selinux had nothing to do with it.

Thank You all.