• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2917
  • Last Modified:

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

-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
eggster34
Asked:
eggster34
1 Solution
 
AutogardCommented:
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
 
nedvisCommented:
"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
 
ahoffmannCommented:
> mysqld          0:off   1:off   2:off   3:off   4:off   5:on    6:off
what is the question then?
0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
linux2000inCommented:
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
 
eggster34Author Commented:
arghh I totally missed that.
thanks a lot.
0
 
AutogardCommented:
You're welcome.  Glad to help!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now