MySQL DBA - Tips and Techniques Magazine

11 Nov 2014

Add mysql to snmp services (Linux only)

1)     Check whether service has been created


            /sbin/chkconfig –-list




            cd /etc/rc.d/init.d/

            ls –ltr my*


            -rwxr-xr-x 1 root root 4582 Dec 19 01:18 mysqld


            Service has been created but in wrong name, should by mysql


2)     Rename existing service to mysql


a.      Remove existing service


      /sbin/chkconfig --del mysqld


b.      Rename mysqld to mysql


                        mv mysqld mysql


c.      Add correct service


                        /sbin/chkconfig --add mysql


d.      Check everything ok


                        /sbin/chkconfig --list



3)     Try stopping and starting mysql


            /sbin/service mysql stop


            /sbin/service mysql start


No comments:

Post a Comment