niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » MySQL
mysqld refuses to run on boot
Post new topic   Reply to topic Page 1 of 1 [10 Posts] View previous topic :: View next topic
Author Message
Karl Larsen
*nix forums beginner


Joined: 16 Jun 2006
Posts: 21

PostPosted: Sun Jun 25, 2006 12:04 pm    Post subject: Re: mysqld refuses to run on boot Reply with quote

Karl Larsen wrote:
Quote:
Duncan Hill wrote:
On Saturday 24 June 2006 12:49, Karl Larsen wrote:

Hi Joerg, I'm using Ferdora Core 4 of Red Hat and I have in
/etc/rc.d/init/ a file mysqld which when I use ./mysqld start does
start
the system. But it has to be done every time I turn on the computer. I
do not understand your patch. I can't find what I think is where you
want to put one line of code. The other lines do not exist. Or I don't
know what I.m doing :-)


chkconfig mysqld on


I am really sorry. I had to read man chkconfig and got really
confused but did it because it appeared to do something to the mysqld
file. Maybe it will work. I will see soon.

Karl


This morning when I turned on my computer init loaded mysqld in the

proper slot and I had a system running in X-Windows.

Karl


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
Back to top
Joerg Bruehe
*nix forums Guru Wannabe


Joined: 04 Jun 2002
Posts: 153

PostPosted: Sun Jun 25, 2006 12:00 pm    Post subject: Re: mysqld refuses to run on boot Reply with quote

Hi Karl, Fredrik, all!


Karl Larsen wrote:
Quote:
Joerg Bruehe wrote:
Hi Fredrik, all!


Fredrik Andersson wrote:
Hi all

I have problems getting MySQL autoboot on my RedHat installation.
[[...]]

In addition to permissions (see the other posts), there is another
possible problem: [[...]]

Try this patch to "/etc/init.d/mysql":

--- /etc/init.d/mysql-OLD
+++ /etc/init.d/mysql
@@ -17,6 +17,7 @@
### BEGIN INIT INFO
# Provides: mysql
# Required-Start: $local_fs $network $remote_fs
+# Should-Start: ypbind nscd ldap ntpd xntpd
# Required-Stop: $local_fs $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6

Hi Joerg, I'm using Ferdora Core 4 of Red Hat and I have in
/etc/rc.d/init/ a file mysqld which when I use ./mysqld start does start
the system. But it has to be done every time I turn on the computer. I
do not understand your patch. I can't find what I think is where you
want to put one line of code. The other lines do not exist. Or I don't
know what I.m doing Smile

Ok, verbose form:

Depending on how a machine and a MySQL server is configured, it _may_ be
necessary to start some more other services before MySQL is started.
The start script, which is installed as "/etc/init.d/mysql", contains
some lines that describe such dependencies.

Up to 5.0.22, the lines are:
...
### BEGIN INIT INFO
# Provides: mysql
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
...

The system tools ensure (on installing) that start scripts are called in
bottom-up sequence, first the prerequisites and then the dependents
(first the lower-level services, then the ones using them).

Now _if_ the installation uses NIS (former "yp", "yellow pages"), a name
server cache daemon, or LDAP, these services may not be up and running
when the MySQL server starts - causing problems.

To prevent this, more dependency information has been added. So the
resulting lines are these:
...
### BEGIN INIT INFO
# Provides: mysql
# Required-Start: $local_fs $network $remote_fs
# Should-Start: ypbind nscd ldap ntpd xntpd
# Required-Stop: $local_fs $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
...

If you install / upgrade using a RPM package, "rpm" should take care of
installing the server start script.
If you use a "tar.gz" package, "chkconfig" may be the tool to use -
sorry, I am no RedHat user myself, so I will leave the search for
details to you.
Keywords: "chkconfig", "ntsysv", "redhat-config-services", "run level".

In any case, the result should be some symbolic links from the run level
start directories "/etc/init.d/rc2.d", "/etc/init.d/rc3.d", ... to that
script, similar to this:

:~> ls -l /etc/init.d /etc/init.d/rc3.d/
/etc/init.d:
insgesamt 381
-rw-r--r-- 1 root root 482 2004-08-25 16:20 Makefile
-rw-r--r-- 1 root root 6851 2005-03-23 22:31 README
..... .....
-rwxr-xr-x 1 root root 9359 2006-06-23 16:41 mysql
..... .....

/etc/init.d/rc3.d/:
insgesamt 0
lrwxrwxrwx 1 root root 6 2006-03-27 09:31 K06hal -> ../hal
..... .....
lrwxrwxrwx 1 root root 8 2006-06-19 15:44 K10mysql -> ../mysql
..... .....
lrwxrwxrwx 1 root root 8 2006-06-19 15:44 S12mysql -> ../mysql
..... .....

Which means: In my example, in run level 3 ("rc3.d") the MySQL server is
at position 10 for stopping (K10) and at position 12 for starting (S12).

You need such symbolic links for MySQL to be started automatically at
all on system bootup (for each run level in which you want it started),
and you need them in the proper position (number) so that starting
(stopping) services is done in the correct order of dependencies.


Hope that helps,
Joerg

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
Back to top
Karl Larsen
*nix forums beginner


Joined: 16 Jun 2006
Posts: 21

PostPosted: Sat Jun 24, 2006 12:17 pm    Post subject: Re: mysqld refuses to run on boot Reply with quote

Duncan Hill wrote:
Quote:
On Saturday 24 June 2006 12:49, Karl Larsen wrote:

Hi Joerg, I'm using Ferdora Core 4 of Red Hat and I have in
/etc/rc.d/init/ a file mysqld which when I use ./mysqld start does start
the system. But it has to be done every time I turn on the computer. I
do not understand your patch. I can't find what I think is where you
want to put one line of code. The other lines do not exist. Or I don't
know what I.m doing :-)


chkconfig mysqld on


I am really sorry. I had to read man chkconfig and got really

confused but did it because it appeared to do something to the mysqld
file. Maybe it will work. I will see soon.

Karl


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
Back to top
Duncan Hill
*nix forums addict


Joined: 04 Feb 2005
Posts: 76

PostPosted: Sat Jun 24, 2006 11:54 am    Post subject: Re: mysqld refuses to run on boot Reply with quote

On Saturday 24 June 2006 12:49, Karl Larsen wrote:
Quote:
    Hi Joerg, I'm using Ferdora Core 4 of Red Hat and I have in
/etc/rc.d/init/ a file mysqld which when I use ./mysqld start does start
the system. But it has to be done every time I turn on the computer. I
do not understand your patch. I can't find what I think is where you
want to put one line of code. The other lines do not exist. Or I don't
know what I.m doing Smile

chkconfig mysqld on

--
Duncan Hill - Developer
Critical Software
+44 (0)870 770 8190
--
Scanned by iCritical.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
Back to top
Karl Larsen
*nix forums beginner


Joined: 16 Jun 2006
Posts: 21

PostPosted: Sat Jun 24, 2006 11:49 am    Post subject: Re: mysqld refuses to run on boot Reply with quote

Joerg Bruehe wrote:
Quote:
Hi Fredrik, all!


Fredrik Andersson wrote:
Hi all

I have problems getting MySQL autoboot on my RedHat installation.
[[...]]

In addition to permissions (see the other posts), there is another
possible problem:
Depending on how your environment is set up, the MySQL server may need
some other services (NIS and related) to run which were originally not
listed in the server start file. Please see bug#18810 for details.

Try this patch to "/etc/init.d/mysql":

--- /etc/init.d/mysql-OLD
+++ /etc/init.d/mysql
@@ -17,6 +17,7 @@
### BEGIN INIT INFO
# Provides: mysql
# Required-Start: $local_fs $network $remote_fs
+# Should-Start: ypbind nscd ldap ntpd xntpd
# Required-Stop: $local_fs $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6

Hi Joerg, I'm using Ferdora Core 4 of Red Hat and I have in

/etc/rc.d/init/ a file mysqld which when I use ./mysqld start does start
the system. But it has to be done every time I turn on the computer. I
do not understand your patch. I can't find what I think is where you
want to put one line of code. The other lines do not exist. Or I don't
know what I.m doing :-)

Karl

Quote:
This fix will appear in 5.0.23.


HTH,
Jörg



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
Back to top
Joerg Bruehe
*nix forums Guru Wannabe


Joined: 04 Jun 2002
Posts: 153

PostPosted: Fri Jun 23, 2006 2:11 pm    Post subject: Re: mysqld refuses to run on boot Reply with quote

Hi Fredrik, all!


Fredrik Andersson wrote:
Quote:
Hi all

I have problems getting MySQL autoboot on my RedHat installation. [[...]]

In addition to permissions (see the other posts), there is another
possible problem:
Depending on how your environment is set up, the MySQL server may need
some other services (NIS and related) to run which were originally not
listed in the server start file. Please see bug#18810 for details.

Try this patch to "/etc/init.d/mysql":

--- /etc/init.d/mysql-OLD
+++ /etc/init.d/mysql
@@ -17,6 +17,7 @@
### BEGIN INIT INFO
# Provides: mysql
# Required-Start: $local_fs $network $remote_fs
+# Should-Start: ypbind nscd ldap ntpd xntpd
# Required-Stop: $local_fs $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6

This fix will appear in 5.0.23.


HTH,
Jörg

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
Back to top
Jay Pipes
*nix forums beginner


Joined: 19 May 2006
Posts: 20

PostPosted: Thu Jun 22, 2006 2:45 pm    Post subject: Re: mysqld refuses to run on boot Reply with quote

Fredrik Andersson wrote:
Quote:
Both datadir and basedir is owned by mysql and the mysql group.

I have hit rockbottom here it seems Sad

first, check the error log for mysql. Should be in the datadir, named
localhost.localdomain.err I believe on RH. There will be an entry in
there explaining that something is problematic with permissions. It
probably is the PID directory, IMO. Make sure you know where MySQL is
trying to create the pid file...

Let us know how things work out.

Cheers!

Quote:
Den 6/21/2006, skrev "Jay Pipes" <jay@mysql.com>:

Probably a permissions issue. Ensure that the directory in which the
pid file is created (I believe /var/run or /var/lib/mysql on RH) has
write permission for the mysql system user/group. Also, ensure
permissions/ownership on the datadir (/var/lib/mysql) for the mysql
owner/group.

Fredrik Andersson wrote:
Hi all

I have problems getting MySQL autoboot on my RedHat installation. I have
tried to add the mysql.server start script from the install dir to the
system with chkconfig --add mysql (I copied it to /etc/init.d/) and then
trying to add mysql to the default boot order with chkconfig mysql on
but no luck there.

I have even tried to edit rc.local with the commands service mysql start
(this work when I run it myself) and mysqld -u mysql ...

The log file says that mysql has been started and then ended directly
after..

060621 13:12:29 mysqld started
060621 13:12:33 mysqld ended

Anyone that have any tip on how to solve this?

I can add that chkconfig -- list | grep mysql tells me that MySQL has
been configured to run on boot levels 3,4 and 5 correctly and go down on
1,2 and 6 but still it refuses to work. =(

Version being used is, RHEL 4.3 and MySQL 5.0.22

All help is greatly appreciated.

--
Jay Pipes
Community Relations Manager, North America, MySQL Inc.
Roaming North America, based in Columbus, Ohio
email: jay@mysql.com mob: +1 614 406 1267

Are You MySQL Certified? http://www.mysql.com/certification
Got Cluster? http://www.mysql.com/cluster

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=andersson@r2m.se



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
Back to top
Jay Pipes
*nix forums beginner


Joined: 19 May 2006
Posts: 20

PostPosted: Wed Jun 21, 2006 2:58 pm    Post subject: Re: mysqld refuses to run on boot Reply with quote

Probably a permissions issue. Ensure that the directory in which the
pid file is created (I believe /var/run or /var/lib/mysql on RH) has
write permission for the mysql system user/group. Also, ensure
permissions/ownership on the datadir (/var/lib/mysql) for the mysql
owner/group.

Fredrik Andersson wrote:
Quote:
Hi all

I have problems getting MySQL autoboot on my RedHat installation. I have
tried to add the mysql.server start script from the install dir to the
system with chkconfig --add mysql (I copied it to /etc/init.d/) and then
trying to add mysql to the default boot order with chkconfig mysql on
but no luck there.

I have even tried to edit rc.local with the commands service mysql start
(this work when I run it myself) and mysqld -u mysql ...

The log file says that mysql has been started and then ended directly
after..

060621 13:12:29 mysqld started
060621 13:12:33 mysqld ended

Anyone that have any tip on how to solve this?

I can add that chkconfig -- list | grep mysql tells me that MySQL has
been configured to run on boot levels 3,4 and 5 correctly and go down on
1,2 and 6 but still it refuses to work. =(

Version being used is, RHEL 4.3 and MySQL 5.0.22

All help is greatly appreciated.


--
Jay Pipes
Community Relations Manager, North America, MySQL Inc.
Roaming North America, based in Columbus, Ohio
email: jay@mysql.com mob: +1 614 406 1267

Are You MySQL Certified? http://www.mysql.com/certification
Got Cluster? http://www.mysql.com/cluster

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
Back to top
Daniel da Veiga
*nix forums addict


Joined: 22 Feb 2006
Posts: 67

PostPosted: Wed Jun 21, 2006 2:27 pm    Post subject: Re: mysqld refuses to run on boot Reply with quote

On 6/21/06, Fredrik Andersson <andersson@r2m.se> wrote:
Quote:
Hi all

I have problems getting MySQL autoboot on my RedHat installation. I have
tried to add the mysql.server start script from the install dir to the
system with chkconfig --add mysql (I copied it to /etc/init.d/) and then
trying to add mysql to the default boot order with chkconfig mysql on
but no luck there.

I have even tried to edit rc.local with the commands service mysql start
(this work when I run it myself) and mysqld -u mysql ...

The log file says that mysql has been started and then ended directly
after..

060621 13:12:29 mysqld started
060621 13:12:33 mysqld ended

Anyone that have any tip on how to solve this?

I can add that chkconfig -- list | grep mysql tells me that MySQL has
been configured to run on boot levels 3,4 and 5 correctly and go down on
1,2 and 6 but still it refuses to work. =(

Version being used is, RHEL 4.3 and MySQL 5.0.22

All help is greatly appreciated.


OK, I have an old RH here, maybe I can help.
Check if you have /etc/init.d/mysql file and that it has proper
permissions i.e: -rwxr-xr-x
Check your /etc/rc.d/rc#.d dirs (where # is the number of the level)
and that they have symlinks to your /etc/init.d/mysql file.
If they are not there...

ln -s /etc/init.d/mysql /etc/rc.d/rc#.d/S90mysql

One time for each of the runlevels where you want mysql on. Note that
I put S90 so I don't accidently confuse it with the real init script.

Good luck,

PS: That's why I love Gentoo. "rc-update add mysql default" and voilá, its done.

--
Daniel da Veiga
Computer Operator - RS - Brazil
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
------END GEEK CODE BLOCK------

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
Back to top
Fredrik Andersson
*nix forums beginner


Joined: 21 Jun 2006
Posts: 1

PostPosted: Wed Jun 21, 2006 2:05 pm    Post subject: mysqld refuses to run on boot Reply with quote

Hi all

I have problems getting MySQL autoboot on my RedHat installation. I have
tried to add the mysql.server start script from the install dir to the
system with chkconfig --add mysql (I copied it to /etc/init.d/) and then
trying to add mysql to the default boot order with chkconfig mysql on
but no luck there.

I have even tried to edit rc.local with the commands service mysql start
(this work when I run it myself) and mysqld -u mysql ...

The log file says that mysql has been started and then ended directly
after..

060621 13:12:29 mysqld started
060621 13:12:33 mysqld ended

Anyone that have any tip on how to solve this?

I can add that chkconfig -- list | grep mysql tells me that MySQL has
been configured to run on boot levels 3,4 and 5 correctly and go down on
1,2 and 6 but still it refuses to work. =(

Version being used is, RHEL 4.3 and MySQL 5.0.22

All help is greatly appreciated.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [10 Posts] View previous topic :: View next topic
The time now is Sat Jan 10, 2009 1:10 am | All times are GMT
navigation Forum index » Databases » MySQL
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts fsck during startup following mirroring of boot drives Joe D. Solaris 0 Thu Jul 20, 2006 9:09 pm
No new posts Is there a boot loader that can load a file a start up an... christopher.mcrorie@gmail Setup 1 Thu Jul 20, 2006 2:57 am
No new posts mysqld-nt 100% CPU Utilization? Robinson, Eric MySQL 2 Wed Jul 19, 2006 11:35 pm
No new posts 7044-170 automatic boot after power on temp_acc@yahoo.de AIX 5 Tue Jul 18, 2006 7:27 pm
No new posts Server fails to boot with LED 0554 after updating from AI... Dan AIX 1 Tue Jul 18, 2006 10:32 am

Credit Cards | Tesco | El libro de los nombre | Debt Consolidation | Credit Cards
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 2.3480s ][ Queries: 20 (2.1943s) ][ GZIP on - Debug on ]