Solved

how does mysql auto start on red hat linux enterprise server 3 ?

Posted on 2006-06-09
6
2,845 Views
Last Modified: 2013-12-06
-bash-2.05b# ps aux | grep mysql
root      4795  0.0  0.1  4252 1156 ?        S    17:35   0:00 /bin/sh /usr/bin/safe_mysqld --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pid
mysql     4824  0.1  0.2 14368 2912 ?        S    17:35   0:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking
root      5186  0.0  0.0  3692  668 pts/0    S    17:45   0:00 grep mysql
-bash-2.05b#

I have a Redhat EL3 server running mysql as seen above.
However, my chkconfig is below. I'd like to find out how mysql is auto-starting.

The reason I'm asking is because I received the "too many connections" error earlier today and I'd like to increase the number of max. connections but I don't know how to do that. Please help.

-bash-2.05b# chkconfig --list
microcode_ctl   0:off   1:off   2:on    3:on    4:on    5:on    6:off
gpm             0:off   1:off   2:on    3:on    4:on    5:on    6:off
kudzu           0:off   1:off   2:off   3:on    4:on    5:on    6:off
syslog          0:off   1:off   2:on    3:on    4:on    5:on    6:off
netfs           0:off   1:off   2:off   3:on    4:on    5:on    6:off
network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
random          0:off   1:off   2:on    3:on    4:on    5:on    6:off
rawdevices      0:off   1:off   2:off   3:on    4:on    5:on    6:off
saslauthd       0:off   1:off   2:off   3:off   4:off   5:on    6:off
mdmonitor       0:off   1:off   2:on    3:on    4:on    5:on    6:off
atd             0:off   1:off   2:off   3:on    4:on    5:on    6:off
irda            0:off   1:off   2:off   3:off   4:off   5:off   6:off
nscd            0:off   1:off   2:off   3:off   4:off   5:off   6:off
psacct          0:off   1:off   2:off   3:off   4:off   5:off   6:off
apmd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
isdn            0:off   1:off   2:on    3:on    4:on    5:on    6:off
iptables        0:off   1:off   2:off   3:off   4:off   5:off   6:off
ip6tables       0:off   1:off   2:on    3:on    4:on    5:on    6:off
pcmcia          0:off   1:off   2:on    3:on    4:on    5:on    6:off
irqbalance      0:off   1:off   2:off   3:on    4:on    5:on    6:off
sendmail        0:off   1:off   2:on    3:on    4:on    5:on    6:off
smartd          0:off   1:off   2:off   3:off   4:off   5:off   6:off
autofs          0:off   1:off   2:off   3:on    4:on    5:on    6:off
netdump         0:off   1:off   2:off   3:off   4:off   5:off   6:off
sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
portmap         0:off   1:off   2:off   3:on    4:on    5:on    6:off
nfs             0:off   1:off   2:off   3:off   4:off   5:off   6:off
nfslock         0:off   1:off   2:off   3:on    4:on    5:on    6:off
snmptrapd       0:off   1:off   2:off   3:off   4:off   5:off   6:off
rhnsd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off
xinetd          0:off   1:off   2:off   3:on    4:on    5:on    6:off
cups            0:off   1:off   2:on    3:on    4:on    5:on    6:off
ypbind          0:off   1:off   2:off   3:off   4:off   5:off   6:off
snmpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
vncserver       0:off   1:off   2:off   3:off   4:off   5:off   6:off
hpoj            0:off   1:off   2:on    3:on    4:on    5:on    6:off
xfs             0:off   1:off   2:on    3:on    4:on    5:on    6:off
ntpd            0:off   1:off   2:off   3:off   4:off   5:off   6:off
spamassassin    0:off   1:off   2:off   3:on    4:off   5:on    6:off
winbind         0:off   1:off   2:off   3:off   4:off   5:off   6:off
lisa            0:off   1:off   2:off   3:off   4:off   5:off   6:off
canna           0:off   1:off   2:on    3:on    4:on    5:on    6:off
smb             0:off   1:off   2:off   3:off   4:off   5:off   6:off
dc_client       0:off   1:off   2:off   3:off   4:off   5:off   6:off
dc_server       0:off   1:off   2:off   3:off   4:off   5:off   6:off
httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
aep1000         0:off   1:off   2:off   3:off   4:off   5:off   6:off
bcm5820         0:off   1:off   2:off   3:off   4:off   5:off   6:off
squid           0:off   1:off   2:off   3:off   4:off   5:off   6:off
dhcrelay        0:off   1:off   2:off   3:off   4:off   5:off   6:off
named           0:off   1:off   2:off   3:on    4:off   5:on    6:off
vsftpd          0:off   1:off   2:on    3:on    4:on    5:on    6:off
dhcpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
netdump-server  0:off   1:off   2:off   3:off   4:off   5:off   6:off
ldap            0:off   1:off   2:off   3:off   4:off   5:off   6:off
arptables_jf    0:off   1:off   2:on    3:on    4:on    5:on    6:off
yppasswdd       0:off   1:off   2:off   3:off   4:off   5:off   6:off
ypserv          0:off   1:off   2:off   3:off   4:off   5:off   6:off
ypxfrd          0:off   1:off   2:off   3:off   4:off   5:off   6:off
tux             0:off   1:off   2:off   3:off   4:off   5:off   6:off
mysqld          0:off   1:off   2:off   3:off   4:off   5:on    6:off
dkms_autoinstaller      0:off   1:off   2:on    3:on    4:on    5:on    6:off
webmin          0:off   1:off   2:on    3:on    4:off   5:on    6:off
mdmpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
xinetd based services:
        krb5-telnet:    off
        rsync:  off
        eklogin:        off
        gssftp: off
        klogin: off
        chargen-udp:    off
        kshell: off
        chargen:        off
        daytime-udp:    off
        daytime:        off
        echo-udp:       off
        echo:   off
        services:       off
        time:   off
        time-udp:       off
        cups-lpd:       off
        sgi_fam:        on
        ktalk:  off
        imap:   on
        imaps:  off
        ipop2:  off
        ipop3:  on
        pop3s:  off
        tftp:   off
0
Comment
Question by:eggster34
6 Comments
 
LVL 8

Accepted Solution

by:
Autogard earned 500 total points
ID: 16875338
It looks like your mysqld is set to start up automatically for run level 5 (which is probably your default runlevel).  Do a "chkconfig mysqld" to see if it is on or off and set it to whatever you want "chkconfig mysqld off" or "chkconfig mysqld on".

Run "mysqld --verbose --help" to see what your "max_connections" variable is set to (http://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html).  By default it should be 100.

To increase this value (http://dev.mysql.com/doc/refman/4.1/en/using-system-variables.html):
1. open your /etc/my.cnf file
2. go to the "[mysqld]" section
3. under that section add "max_connections=<whatevernumber>" (if you are running mysql > 4.0.2; otherwise "set-variable=max_connections=<whatevernumber>")
4. now restart the mysql daemon (/etc/init.d/mysqld restart)
5. Check your max_connections variable again (mysqld --verbose --help | grep max_connections)

That should do the trick
0
 
LVL 20

Expert Comment

by:nedvis
ID: 16875339
"However, my chkconfig is below. I'd like to find out how mysql is auto-starting."
      If you want to prevent MSQL from automatically starting when booting your systm in full GUI mode type this in terminal windows ( you have to be root=su )

/sbin/chkconfig -level  5 mysqld off     ( to disable msqld  for runlebvel 5 )

If you want only to stop MSQL but not ot disable server autostart type this :
/sbin/service   msqld   stop                    ( to kill servers process )
 
   As I can see from your chkconfig list, MSQL deamon is enabled only for full graphical mode - level 5 :
   mysqld          0:off   1:off   2:off   3:off   4:off   5:on    6:off  

nedvis                      
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 16878125
> mysqld          0:off   1:off   2:off   3:off   4:off   5:on    6:off
what is the question then?
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 2

Expert Comment

by:linux2000in
ID: 16882299
Hi,


If you need more connections than the default (100), then you should restart mysqld with a bigger value for the max_connections variable

The maximum number of connects MySQL is depending on how good the thread library is on a given platform. Linux or Solaris should be able to support 500-1000 simultaneous connections, depending on how much RAM you have and what your clients are doing.

regards
linux2000in

www.linux-directory.net :: It's all about Open Source & Linux

www.linux-gujarat.co.in :: Learn Linux in different WAY !!!
0
 

Author Comment

by:eggster34
ID: 16889214
arghh I totally missed that.
thanks a lot.
0
 
LVL 8

Expert Comment

by:Autogard
ID: 16889242
You're welcome.  Glad to help!
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now