how to start automatically mysql-server at boot time?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
tweet
Forum Newbie
Posts: 13
Joined: Wed May 28, 2003 1:18 am

how to start automatically mysql-server at boot time?

Post by tweet »

redhat9.0. used.. mysql-4.0.16.tar.gz installed..
how to start automatically mysql-server at boot time? :twisted: :oops: :lol:
User avatar
Stoker
Forum Regular
Posts: 782
Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:

Post by Stoker »

This has nothing to do with php...

make an init script, I don't recall where RedHat stores such, in Debian and may others the script (accepting argument start, stop, restart etc) is in /etc/init.d/daemon and is symlinked from rcN.d/ with Sxxdaemon for start and Kxxdaemon for stop, N is runlevel (2 is normal) and xx is order of execution within directory..

You should probablu try to find a howto on init/init-scripts for Red Hat
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Re: how to start automatically mysql-server at boot time?

Post by BDKR »

tweet wrote:redhat9.0. used.. mysql-4.0.16.tar.gz installed..
how to start automatically mysql-server at boot time? :twisted: :oops: :lol:
If it doesn't matter to you what version of MySQL you are using, check to see if there is a mysql rpm file on your CD. Install that and it will most likely start the service for you at boot.

Otherwise, the tar.gz files should also have a directory with different config file examples and some scripts. One of those is a script that once placed in the correct place will (normally /etc/rc.d/initd/...) start the server for you. However, there is a little more to it that I can't remember off the top of my head. The documentation (mysql.com for example) will help a good deal. You will also need to learn about service and run levels on your Linux boxen.

Cheesr,
BDKR
User avatar
scorphus
Forum Regular
Posts: 589
Joined: Fri May 09, 2003 11:53 pm
Location: Belo Horizonte, Brazil
Contact:

Post by scorphus »

In Red Hat, as I remember, the console application ntsysv let you choose which services will run on boot. Run it by typing ntsysv in console and set mysqld to checked.
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

scorphus wrote:In Red Hat, as I remember, the console application ntsysv let you choose which services will run on boot. Run it by typing ntsysv in console and set mysqld to checked.
Thats exactly the last bit I couldn't remember. Thanx for the backup!

Cheers,
BDKR
Post Reply