odd behaviour with mysqld under init.d on rhel ws 4

lada77_at_yahoo.com
Date: 11/24/05


Date: 23 Nov 2005 16:45:22 -0800

This problem is very odd. I hope someone out there has experienced it
or can provide some useful advice on some areas where I can investigate
to find more problem details/symptoms. I do the following to recreate
the problem:

- install mysql through the default redhat installation process and
have it configured to run through chkconfig at levels 3, 4, 5
eg: chkconfig --list mysqld
mysqld 0:off 1:off 2:off 3:on 4:on 5:on 6:off

- confirm that mysqld starts up normally by running

service mysqld start

- Now, stop mysqld : service mysqld stop
- Do the following :

cd /etc
cp my.cnf my.cnf.tst
rm my.cnf
cp my.cnf.tst /tmp/my.cnf
mv /tmp/my.cnf /etc/my.cnf

Now start mysqld : service mysqld start

- mysqld fails to start but if you run mysqld_safe from the command
line using the same options as being used by /etc/init.d/mysqld start,
it will work.

- Now do the following :

cd /etc
rm my.cnf
cp my.cnf.tst /tmp/my.cnf
cp /tmp/my.cnf /etc/my.cnf

- Now restart httpd using : service mysqld start

- This time it starts fine. It seems to be a problem with the mv
command in that if i move a file from /tmp into /etc, the mysqld daemon
running under initd has problems reading the file.

- Another perculiarity is that if you do the following :
service httpd stop
cd /etc
rm my.cnf
cp my.cnf.tst /tmp/my.cnf
mv /tmp/my.cnf /etc/my.cnf
service httpd start
----> it will fail....so now we do :
cd /etc
cp /etc/my.cnf.tst /etc/my.cnf
service httpd start
----> and it still fails even after the cp command over-writes the
existing my.cnf file

Note that the error I see in the mysql error log is as follows :

051123 15:45:47 mysqld started
Could not open required defaults file: /etc/my.cnf
Fatal error in defaults handling. Program aborted
051123 15:45:47 mysqld ended

I am running redhat enterprise ws 4 with the latest patches.

This problem does not seem to depend on the contents of the /etc/my.cnf
file

Doing md5 and check sums of the good and bad isntances of the my.cnf
file i see no difference in the files.

Any help is greatly appreciated.

Thank



Relevant Pages

  • odd behaviour with mysqld under init.d on rhel ws 4
    ... - confirm that mysqld starts up normally by running ... stop mysqld: service mysqld stop ... command in that if i move a file from /tmp into /etc, ... service httpd start ...
    (alt.os.linux.redhat)
  • Re: How to configure mysql server?
    ... To start mysqld at boot time you have to copy support-files/mysql.server ... I've no problem running mysqld - with "sudo service mysqld restart". ... My problem is that I cannot access the mysql server on my desktop ... [root@alfred lib]# mkdir mysql.bak ...
    (Fedora)
  • Re: MySQL in Red Hat Linux 7.3
    ... > AFAIK not created just after installation. ... you have to do the 'service mysqld start' command as root. ...
    (linux.redhat)
  • Re: I installed the mysql package WHAT IS NEXT? AHT ARE THE BASIC STEPS I NEEDTO TAKE JUST TO CREA
    ... Check that mysqld is running. ... $ service mysqld status ... Menu -> System Settings -> Server Settings if you prefer. ... Basic System Administration documentation: ...
    (Fedora)
  • Re: Cant start mysql on FC3
    ... Craig White wrote: ... > service mysqld start ... To start mysqld at boot time you have to copy support-files/mysql.server ... You can test the MySQL daemon with the benchmarks in the 'sql-bench' ...
    (Fedora)