Solved

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

Posted on 2006-06-09
6
2,854 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux : taking backup different mount points under the same directory 8 67
Linux tcp ports listening for testing 4 62
Reset Root Password on CentOS 6 4 53
Choosing CentOS 16 79
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

776 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