Solved

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

Posted on 2006-06-09
6
2,866 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

734 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